mirror of
https://github.com//cppla/ServerStatus
synced 2026-03-25 15:59:45 +08:00
add client docker
This commit is contained in:
33
Dockerfile.client
Normal file
33
Dockerfile.client
Normal 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 []
|
||||
Reference in New Issue
Block a user