Skip to content

Instantly share code, notes, and snippets.

@dweomer
Last active September 11, 2023 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dweomer/f8412bec1169b4a13836f5b96e63d2b1 to your computer and use it in GitHub Desktop.
Save dweomer/f8412bec1169b4a13836f5b96e63d2b1 to your computer and use it in GitHub Desktop.
helm + boringcrypto
git clone https://github.com/helm/helm.git && cd helm
# alpine (success)
make clean; \
docker run --rm -it --volume $PWD:$PWD -w $PWD library/golang:1.19-alpine sh -c " \
cat /etc/os-release; apk add file gcc g++ make bash; \
make GOEXPERIMENT=boringcrypto \
GOFLAGS='-buildvcs=false' \
CGO_ENABLED=1 \
TAGS=netgo,osusergo \
LDFLAGS='-w -linkmode=external -extldflags \"-static -Wl,--fatal-warnings\"' \
&& file bin/helm \
&& (ldd bin/helm || true) \
&& go tool nm bin/helm | grep boring | tail \
"
git clone https://github.com/helm/helm.git && cd helm
# sles bci (fail)
make clean; \
docker run --rm -it --volume $PWD:$PWD -w $PWD registry.suse.com/bci/golang:1.19 sh -c " \
cat /etc/os-release; zypper -n install glibc-devel-static; \
make GOEXPERIMENT=boringcrypto \
GOFLAGS='-buildvcs=false' \
CGO_ENABLED=1 \
TAGS=netgo,osusergo \
LDFLAGS='-w -linkmode=external -extldflags \"-static -Wl,--fatal-warnings\"' \
&& file bin/helm \
&& (ldd bin/helm || true) \
&& go tool nm bin/helm | grep boring | tail \
"
git clone https://github.com/helm/helm.git && cd helm
# debian (fail)
make clean; \
docker run --rm -it --volume $PWD:$PWD -w $PWD library/golang:1.19-bookworm sh -c " \
cat /etc/os-release; apt-get update -q; apt-get install -y file; \
make GOEXPERIMENT=boringcrypto \
GOFLAGS='-buildvcs=false' \
CGO_ENABLED=1 \
TAGS=netgo,osusergo \
LDFLAGS='-w -linkmode=external -extldflags \"-static -Wl,--fatal-warnings\"' \
&& file bin/helm \
&& (ldd bin/helm || true) \
&& go tool nm bin/helm | grep boring | tail \
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment