Advertisement
zefie

build golang on alpine linux

May 25th, 2019
467
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.35 KB | None | 0 0
  1. #!/bin/bash
  2. export GOLANG_VERSION=1.12.5
  3. apk add --virtual .build-deps musl-dev go gcc openssl bash
  4. GOROOT_BOOTSTRAP="$(go env GOROOT)"
  5. wget -O go.tgz "https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz"
  6. tar -C /usr/local -xzf go.tgz
  7. rm go.tgz
  8. cd /usr/local/go/src
  9. ./make.bash
  10. rm -rf /usr/local/go/pkg/bootstrap /usr/local/go/pkg/obj
  11. apk del .build-deps
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement