Files
projects/Dockers/vpn-proxy/Dockerfile
T
Bram a71b3adb40
Build and Push Docker Images / build-and-push (push) Successful in 3m37s
vpn proxy
2025-09-06 22:16:54 +02:00

40 lines
768 B
Docker

FROM alpine:latest
# Install necessary packages
RUN apk add --no-cache \
openvpn \
squid \
curl \
bash \
iptables \
ip6tables \
net-tools \
procps \
&& rm -rf /var/cache/apk/*
# Create directories
RUN mkdir -p /etc/openvpn /var/log/squid /var/cache/squid /var/run/squid
# Copy configuration files
COPY squid.conf /etc/squid/squid.conf
COPY start.sh /start.sh
COPY version /version
# Make scripts executable
RUN chmod +x /start.sh
# Expose proxy port
EXPOSE 3128
# Set environment variables
ENV PROXY_URL=""
ENV VPN_CONFIG=""
ENV VPN_TYPE="openvpn"
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost:3128/ || exit 1
# Start the service
CMD ["/start.sh"]