Skip to content

Commit b24ef88

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

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.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)