I try to install Golang
(go1.13.9.linux-amd64) in docker-in-docker container(docker:dind
) manually (copy go
binaries to a container).
Go
was copied to /go/bin
,
/ # export GOROOT=/go
/ # export PATH=$GOROOT/bin:$PATH
/ #
/ # uname -a
Linux 41868f6e7ae3 4.19.76-linuxkit #1 SMP Tue May 26 11:42:35 UTC 2020 x86_64 Linux
/ #
/ # echo $GOROOT
/go
/ #
/ # echo $PATH
/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
I try check version and get an error:
/ # go version
/bin/sh: go: not found
I try add env
to /etc/profile
👉🏻 the same error.