Dockerfile.network 591 B

123456789
  1. # Source/version fixed; Go module downloads are verified by the module checksum database.
  2. FROM golang:1.24.4-bookworm AS builder
  3. RUN CGO_ENABLED=0 GOBIN=/out go install github.com/xjasonlyu/tun2socks/v2@v2.6.0
  4. FROM debian:bookworm-slim
  5. RUN apt-get update && apt-get install -y --no-install-recommends python3 iproute2 && rm -rf /var/lib/apt/lists/*
  6. COPY --from=builder /out/tun2socks /usr/local/bin/tun2socks
  7. COPY network_gateway.py /usr/local/libexec/yaoyao/network_gateway.py
  8. LABEL cn.samien.yaoyao.network-gateway="1"
  9. ENTRYPOINT ["python3","/usr/local/libexec/yaoyao/network_gateway.py"]