docker run -it --rm -v /root/golang/go:/go -v /root/golang/code:/code --privileged docker.io/golang bash
docker run --rm -v "$PWD":/usr/src/app -w /usr/src/app golang:latest go build -v
1.设置golang环境
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.io
go build
2.编译完成后的效果
go: downloading github.com/gin-gonic/gin v1.6.3
go: downloading github.com/deepch/vdk v0.0.0-20210115152623-8d167fd1c067
go: downloading github.com/gin-contrib/sse v0.1.0
go: downloading github.com/mattn/go-isatty v0.0.12
go: downloading github.com/golang/protobuf v1.4.2
go: downloading github.com/ugorji/go v1.1.7
go: downloading gopkg.in/yaml.v2 v2.3.0
go: downloading github.com/go-playground/validator/v10 v10.2.0
go: downloading golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f
go: downloading github.com/ugorji/go/codec v1.1.7
go: downloading github.com/pion/interceptor v0.0.8
go: downloa