2025-12-30 16:33:51 -03:00
|
|
|
# Single stage build for Cluster Node
|
2026-11-17 09:49:59 -03:00
|
|
|
FROM python:3.14-slim
|
2025-12-30 16:33:51 -03:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
# Install necessary runtime packages
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
2026-11-17 09:49:59 -03:00
|
|
|
wireguard-tools \
|
2025-12-30 16:33:51 -03:00
|
|
|
iptables \
|
|
|
|
|
iproute2 \
|
|
|
|
|
net-tools \
|
|
|
|
|
inetutils-ping \
|
|
|
|
|
inetutils-traceroute \
|
|
|
|
|
procps \
|
|
|
|
|
curl \
|
|
|
|
|
nano \
|
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
# Copy requirements and install Python packages
|
|
|
|
|
# Using the specific requirements.txt for this container
|
|
|
|
|
COPY requirements.txt /app/requirements.txt
|
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
|
|
|
# Copy the application code
|
2026-11-17 09:49:59 -03:00
|
|
|
COPY cluster_worker.py entrypoint.sh /app/
|
2025-12-30 16:33:51 -03:00
|
|
|
|
|
|
|
|
# Set execution permissions on scripts
|
|
|
|
|
RUN chmod +x /app/entrypoint.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ENTRYPOINT ["/app/entrypoint.sh"]
|
|
|
|
|
CMD ["python", "-u", "/app/cluster_worker.py"]
|