github.com/replit/upm@v0.0.0-20240423230255-9ce4fc3ea24c/scripts/docker-install-godoc.bash (about) 1 #!/usr/bin/env bash 2 3 set -e 4 set -o pipefail 5 6 cd /tmp 7 8 packages=" 9 10 # to download go and watchexec 11 wget 12 13 # needed for 'go get' 14 git 15 16 " 17 18 export DEBIAN_FRONTEND=noninteractive 19 apt-get update 20 apt-get install -y $(grep -v "^#" <<< "$packages") 21 rm -rf /var/lib/apt/lists/* 22 23 # We can't use Go from the Ubuntu repositories because it's not new 24 # enough to have support for Go modules. 25 wget -nv https://dl.google.com/go/go1.17.1.linux-amd64.tar.gz 26 tar -C /usr/local -xzf *.tar.gz 27 rm *.tar.gz 28 29 # Watchexec is not available from the Ubuntu repositories. 30 wget -nv https://github.com/watchexec/watchexec/releases/download/1.10.2/watchexec-1.10.2-x86_64-unknown-linux-gnu.tar.gz 31 tar -xzvf watchexec-*.tar.gz 32 mv watchexec-*/watchexec /usr/bin/ 33 rm -rf watchexec-* 34 35 go get golang.org/x/tools/cmd/godoc 36 37 rm "$0"