mirror of
https://github.com//cppla/ServerStatus
synced 2026-06-22 05:26:09 +08:00
34 lines
858 B
Docker
34 lines
858 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Runtime deps for client-linux.py (ss/ps) and optional psutil client
|
|
RUN apt-get update -y \
|
|
&& apt-get install -y --no-install-recommends iproute2 procps \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN pip install --no-cache-dir psutil
|
|
|
|
COPY clients/client-linux.py /app/client-linux.py
|
|
COPY clients/client-psutil.py /app/client-psutil.py
|
|
COPY clients/entrypoint.sh /app/entrypoint.sh
|
|
|
|
# Default client and defaults (can be overridden by docker env)
|
|
ENV SERVER=127.0.0.1 \
|
|
USER=s01 \
|
|
PORT=35601 \
|
|
PASSWORD=USER_DEFAULT_PASSWORD \
|
|
INTERVAL=1 \
|
|
PROBEPORT=80 \
|
|
PROBE_PROTOCOL_PREFER=ipv4 \
|
|
PING_PACKET_HISTORY_LEN=100 \
|
|
CU=cu.tz.cloudcpp.com \
|
|
CT=ct.tz.cloudcpp.com \
|
|
CM=cm.tz.cloudcpp.com \
|
|
CLIENT=linux
|
|
|
|
RUN chmod +x /app/entrypoint.sh
|
|
|
|
ENTRYPOINT ["/app/entrypoint.sh"]
|
|
CMD []
|