From f1f9bd9636a90dfc1c2cfdd9838ada3d7a733dce Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Wed, 5 Oct 2022 00:27:08 +0800 Subject: [PATCH] build: add sing-box compile --- Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Dockerfile b/Dockerfile index 2d4db03..7b3b542 100644 --- a/Dockerfile +++ b/Dockerfile @@ -268,6 +268,16 @@ RUN env CGO_ENABLED=0 go build -v -trimpath -ldflags "-s -w" && mv main /tmp/v2r COPY --from=upx /tmp/upx /usr/bin/ RUN upx -9 /tmp/v2ray +FROM ${GO19} AS sing +ENV SING="1.0.5" +RUN wget https://github.com/SagerNet/sing-box/archive/refs/tags/v${SING}.tar.gz && tar xf v${SING}.tar.gz +WORKDIR ./sing-box-${SING}/cmd/sing-box/ +RUN go get -d +RUN env CGO_ENABLED=0 go build -v -trimpath -ldflags "-s -w" \ + -tags "with_quic with_grpc with_wireguard with_shadowsocksr with_ech with_utls" && mv sing-box /tmp/ +COPY --from=upx /tmp/upx /usr/bin/ +RUN upx -9 /tmp/sing-box + # Compile trojan-go FROM ${GO18} AS trojan-go ENV TROJAN_GO="v0.10.6" @@ -415,6 +425,7 @@ COPY --from=shadowsocks /release/ /release/usr/bin/ COPY --from=plugin /plugins/ /release/usr/bin/ COPY --from=xray /tmp/xray /release/usr/bin/ COPY --from=v2ray /tmp/v2ray /release/usr/bin/ +COPY --from=sing /tmp/sing-box /release/usr/bin/ COPY --from=trojan /tmp/trojan* /release/usr/bin/ COPY --from=gost /tmp/gost* /release/usr/bin/ COPY --from=brook /tmp/brook /release/usr/bin/