add client docker

This commit is contained in:
cppla
2026-02-26 18:10:24 +08:00
parent 6552959ef3
commit 7b9da31db0
6 changed files with 133 additions and 1 deletions

33
Dockerfile.client Normal file
View File

@@ -0,0 +1,33 @@
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 []