1
0
mirror of https://github.com/donaldzou/WGDashboard.git synced 2024-11-21 23:01:39 +01:00
WGDashboard/Dockerfile

25 lines
990 B
Docker
Raw Normal View History

# Pull from small Debian stable image.
FROM alpine:latest
LABEL maintainer="dselen@nerthus.nl"
2024-08-24 13:45:13 +02:00
ENV PYTHONPATH="/usr/lib/python3.12/site-packages"
WORKDIR /opt/wireguarddashboard/src
RUN apk update && \
2024-08-24 13:45:13 +02:00
apk add --no-cache sudo gcc musl-dev linux-headers && \
apk add --no-cache wireguard-tools && \
2024-08-24 13:45:13 +02:00
apk add --no-cache iptables ip6tables && \
mkdir /opt/wireguarddashboard/src/master-key
2024-08-24 13:45:13 +02:00
COPY ./src /opt/wireguarddashboard/src/
2024-08-24 13:45:13 +02:00
COPY ./docker/alpine/entrypoint.sh /opt/wireguarddashboard/src/
#COPY ./docker/alpine/wgd.sh /opt/wireguarddashboard/src/
#COPY ./docker/alpine/requirements.txt /opt/wireguarddashboard/src/
RUN chmod u+x /opt/wireguarddashboard/src/entrypoint.sh
# Defining a way for Docker to check the health of the container. In this case: checking the login URL.
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD curl -f http://localhost:10086/signin || exit 1
ENTRYPOINT ["/opt/wireguarddashboard/src/entrypoint.sh"]