- Add missing packages to requirements.txt: requests, beautifulsoup4, fake-useragent, yt-dlp, urllib3 - Fix entrypoint.sh: replace grep -oP (GNU) with awk (BusyBox compat) - Fix entrypoint.sh: add policy routing so LAN clients get responses via eth0 instead of through the WireGuard tunnel - Change healthcheck from ping to curl (VPN provider blocks ICMP) - Add start_period and increase retries for healthcheck - Change external port mapping to 2000:8000 - Add podman-compose.prod.yml and push.sh to version control
25 lines
545 B
Docker
25 lines
545 B
Docker
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=5 \
|
|
CMD curl -sf --max-time 5 http://1.1.1.1 || exit 1
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|