Skip to content

Commit fc05948

Browse files
authored
Docker: Use more aggressive inlining for higher efficiency (XTLS#5242)
Syncs XTLS#5026
1 parent e71458c commit fc05948

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.github/docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ WORKDIR /src
66
COPY . .
77
ARG TARGETOS
88
ARG TARGETARCH
9-
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main
9+
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 go build -o xray -trimpath -buildvcs=false -gcflags="all=-l=4" -ldflags "-s -w -buildid=" ./main
1010

1111
# Download geodat into a staging directory
1212
ADD https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geoip.dat /tmp/geodat/geoip.dat

.github/docker/Dockerfile.usa

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ WORKDIR /src
66
COPY . .
77
ARG TARGETOS
88
ARG TARGETARCH
9-
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main
9+
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 go build -o xray -trimpath -buildvcs=false -gcflags="all=-l=4" -ldflags "-s -w -buildid=" ./main
1010

1111
# Download geodat into a staging directory
1212
ADD https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/geoip.dat /tmp/geodat/geoip.dat

0 commit comments

Comments
 (0)