feat: buildx failed with: EROR: failed to solve: executor failed running [/bin/sh -c ./build.sh]: exit code: 127 (#1089)

This commit is contained in:
cofecatt
2022-09-02 14:50:27 +08:00
committed by GitHub
parent e266696b32
commit af9ae7dbb7

View File

@@ -6,6 +6,6 @@ then
echo "Successfully connected to Google, no need to use Go proxy" echo "Successfully connected to Google, no need to use Go proxy"
else else
echo "Google is blocked, Go proxy is enabled: GOPROXY=https://goproxy.cn,direct" echo "Google is blocked, Go proxy is enabled: GOPROXY=https://goproxy.cn,direct"
GO_PROXY_SETTING=GOPROXY=https://goproxy.cn,direct GO_PROXY_SETTING=$(GOPROXY=https://goproxy.cn,direct)
fi fi
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $GO_PROXY_SETTING go build -ldflags="-w -s" -o server . CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $GO_PROXY_SETTING go build -ldflags="-w -s" -o server .