-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
29 lines (21 loc) · 913 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM python:3.12.4-slim-bookworm
ENV PYTHONUNBUFFERED=1 \
PYTHONPATH=/app
RUN apt-get update && \
apt-get install -y wget ca-certificates && \
wget -q https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && \
dpkg -i cloudflared-linux-amd64.deb && \
rm -rf /var/lib/apt/lists/* && \
apt-get remove wget -y && \
rm cloudflared-linux-amd64.deb
# Create cloudflared directory for configuration
RUN mkdir -p /etc/cloudflared
# Set environment variables for cloudflared TODO: SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "TUNNEL_TOKEN") (line 16)
ENV TUNNEL_TOKEN=$TUNNEL_TOKEN
WORKDIR /app
COPY server.py .
COPY requirements.txt .
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
RUN pip install --no-cache-dir -r requirements.txt
ENTRYPOINT ["/entrypoint.sh"]