fadd
This commit is contained in:
@@ -1,18 +1,25 @@
|
||||
# 戎行专用:OpenVPN 客户端 + Dante SOCKS5(仅内网代理)
|
||||
# 戎行专用:OpenVPN 客户端 + microsocks SOCKS5(走系统路由/tun0)
|
||||
FROM alpine:3.19 AS socks-builder
|
||||
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
|
||||
&& apk add --no-cache build-base
|
||||
|
||||
WORKDIR /src
|
||||
COPY third_party/microsocks/ ./
|
||||
RUN make && strip microsocks
|
||||
|
||||
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 --from=socks-builder /src/microsocks /usr/local/bin/microsocks
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
COPY sockd.conf.template /etc/sockd.conf.template
|
||||
RUN chmod +x /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh /usr/local/bin/microsocks
|
||||
|
||||
ENV VPN_DIR=/vpn \
|
||||
SOCKS_HOST=0.0.0.0 \
|
||||
|
||||
Reference in New Issue
Block a user