File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -96,11 +96,11 @@ if test -n "${PLATFORM}"; then
96
96
GO_LDFLAGS=" $GO_LDFLAGS -X \" github.com/docker/cli/cli/version.PlatformName=${PLATFORM} \" "
97
97
fi
98
98
if [ " $CGO_ENABLED " = " 1" ] && [ " $GO_LINKMODE " = " static" ] && [ " $( go env GOOS) " = " linux" ]; then
99
- GO_LDFLAGS=" $GO_LDFLAGS -extldflags -static"
99
+ GO_LDFLAGS=" $GO_LDFLAGS -linkmode external - extldflags -static"
100
100
fi
101
101
if [ " $CGO_ENABLED " = " 1" ] && [ " $GO_LINKMODE " = " static" ]; then
102
- # compiling statically with CGO enabled requires osusergo to be set.
103
- GO_BUILDTAGS=" $GO_BUILDTAGS osusergo"
102
+ # compiling statically with CGO enabled requires osusergo and netgo to be set.
103
+ GO_BUILDTAGS=" $GO_BUILDTAGS osusergo netgo "
104
104
fi
105
105
if [ -n " $GO_STRIP " ]; then
106
106
# if stripping enabled and building with llvm < 12 against darwin/amd64
You can’t perform that action at this time.
0 commit comments