Files
hyapi-server/deployments/openvpn/Dockerfile
2026-07-23 15:22:10 +08:00

29 lines
730 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 戎行专用OpenVPN 客户端 + Dante SOCKS5仅内网代理
FROM alpine:3.19
# 与业务镜像一致,使用国内 apk 源
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
&& apk add --no-cache \
openvpn \
bash \
iproute2 \
dante-server \
curl
COPY entrypoint.sh /entrypoint.sh
COPY sockd.conf.template /etc/sockd.conf.template
RUN chmod +x /entrypoint.sh
ENV VPN_DIR=/vpn \
SOCKS_HOST=0.0.0.0 \
SOCKS_PORT=1080 \
RONGXING_HOST=192.168.3.43
VOLUME ["/vpn"]
EXPOSE 1080
HEALTHCHECK --interval=30s --timeout=5s --start-period=45s --retries=5 \
CMD ip link show tun0 >/dev/null 2>&1 || exit 1
ENTRYPOINT ["/entrypoint.sh"]