-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
75 lines (55 loc) · 2.14 KB
/
Dockerfile
File metadata and controls
75 lines (55 loc) · 2.14 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# syntax=docker/dockerfile:1.2
#FROM docker.io/library/debian:bookworm-slim
FROM python:3.13-slim-bookworm
#FROM alpine:3.21
ENV WARP_SLEEP=2
ENV FLASK_RUN_HOST=0.0.0.0
ENV WEBUI_PORT=${WEBUI_TOKEN:-"15650"}
ENV API_PORT=${API_TOKEN:-"15651"}
#ENV FLASK_APP=app.py
ENV TUNNEL_TOKEN=${TUNNEL_TOKEN:-""}
ENV SERVER_NAME=${SERVER_NAME:-""}
ENV AUTO_CONNECT=${AUTO_CONNECT:-"1"}
ENV CDIR_WG=192.168.242.1/24
ENV SUBNET=${SUBNET:-""}
RUN date >/build-date.txt
#ENV VERSION=$CLOUDFLARED_VERSION
# General settings
USER root
WORKDIR /var/app
# the volume to store the wireguad configuration
VOLUME /var/data
# install general packages
RUN apt-get update
RUN </dev/null DEBIAN_FRONTEND=noninteractive
#RUN apt-get --yes install --no-install-recommends cargo
# install some tools for net monitoring
RUN apt-get --yes install --no-install-recommends \
curl cron tcpdump iputils-ping procps telnet mtr nmap net-tools openssh-server
# install wireguard
RUN apt-get --yes install --no-install-recommends wireguard
# Install cloudflare
RUN apt-get --yes install --no-install-recommends gpg ca-certificates dbus
RUN apt-get --yes install --no-install-recommends lsb-release
RUN curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg
RUN echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/cloudflare-client.list
RUN apt-get update && apt-get install -y cloudflare-warp
# clean the install
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/*
# setting up the python environment
COPY ./app/requirements.txt /var/app
RUN pip install -r ./requirements.txt
EXPOSE ${WEBUI_PORT}
EXPOSE ${API_PORT}
# copy application and entry point data
COPY ./app/ /var/app/
#COPY ./app/frontend /var/app/frontend
#COPY ./app/backend /var/app/backend
#COPY ./app/lib/*.py /var/app/lib
#COPY ./app/*.py /var/app/
#COPY ./app/wg.conf .
COPY --chmod=755 ./entrypoint.sh .
#COPY ./entrypoint.sh .
RUN ["chmod", "+x", "./entrypoint.sh"]
ENTRYPOINT ["./entrypoint.sh"]