docker part 1
This commit is contained in:
24
Docker/Containerfile
Normal file
24
Docker/Containerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM alpine:3.19
|
||||
|
||||
RUN apk add --no-cache \
|
||||
wireguard-tools \
|
||||
iptables \
|
||||
ip6tables \
|
||||
bash \
|
||||
curl \
|
||||
iputils-ping \
|
||||
iproute2 \
|
||||
openresolv
|
||||
|
||||
# Create wireguard config directory (config is mounted at runtime)
|
||||
RUN mkdir -p /etc/wireguard
|
||||
|
||||
# Copy entrypoint
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
# Health check: can we reach the internet through the VPN?
|
||||
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
|
||||
CMD ping -c 1 -W 5 1.1.1.1 || exit 1
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
Reference in New Issue
Block a user