执行命令 bee dockerize
报错如下:
=> ERROR [2/6] RUN go get github.com/tools/godep
[2/6] RUN go get github.com/tools/godep:
#5 21.68 go get: module github.com/tools/godep: Get “https://proxy.golang.org/github.com/tools/godep/@v/list”: dial tcp 142.251.42.241:443: connect: connection refused
executor failed running [/bin/sh -c go get github.com/tools/godep]: exit code: 1
原因:
命令拉取的 docker 容器系统中尚无代理,导致无法访问。
解决方案:
在 Dockerfile 中添加代理: ENV GOPROXY https://goproxy.cn
更多 GO 文章请关注个人公众号:Golang 进阶栈