Files
membank/auto-check/Dockerfile
zw@118 5e650491a2 0825
2026-08-25 22:33:33 +08:00

48 lines
1.2 KiB
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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"]