Files
hyapi-server/deployments/openvpn/Dockerfile

29 lines
730 B
Docker
Raw Normal View History

2026-07-23 15:22:10 +08:00
# 戎行专用OpenVPN 客户端 + Dante SOCKS5仅内网代理
FROM alpine:3.19
2026-07-23 15:13:49 +08:00
2026-07-23 15:22:10 +08:00
# 与业务镜像一致,使用国内 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
2026-07-23 15:13:49 +08:00
COPY entrypoint.sh /entrypoint.sh
2026-07-23 15:22:10 +08:00
COPY sockd.conf.template /etc/sockd.conf.template
2026-07-23 15:13:49 +08:00
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"]