This commit is contained in:
zw@118
2026-08-25 22:33:33 +08:00
parent 0a0e5fdf7f
commit 5e650491a2
4 changed files with 180 additions and 2 deletions

47
auto-check/Dockerfile Normal file
View File

@@ -0,0 +1,47 @@
# stress-tools Dockerfile
# 用于 auto-check 压力测试的容器镜像
# 预装所有压测工具,避免目标机在线安装依赖
#
# 构建: docker build -t stress-tools:latest .
# 推送: docker push registry.example.com/stress-tools:latest
# 离线导入: docker save stress-tools:latest | gzip > stress-tools.tar.gz
# docker load < stress-tools.tar.gz
FROM ubuntu:22.04
LABEL maintainer="auto-check"
LABEL description="压力测试工具集stress-ng, fio, stressapptest, lm-sensors"
LABEL version="1.0.0"
# 避免交互式提示
ENV DEBIAN_FRONTEND=noninteractive
# 安装压测核心工具
RUN apt-get update && apt-get install -y --no-install-recommends \
# 压力测试
stress-ng \
stressapptest \
# 磁盘测试
fio \
# 温度监控
lm-sensors \
# 系统信息
sysstat \
procps \
coreutils \
util-linux \
# 脚本工具
bash \
awk \
sed \
grep \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# 初始化 sensors加载内核模块
RUN sensors --detect 2>/dev/null || true
WORKDIR /workspace
# 默认使用 bash脚本通过 stdin 传入)
ENTRYPOINT ["/bin/bash"]