Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

How to set go env GOPROXY=https://goproxy.cn,direct in the docker container? #197

Closed
xuanjiang1985 opened this issue Sep 29, 2020 · 1 comment

Comments

@xuanjiang1985
Copy link

Checking for required docker image karalabe/xgo-latest... found.
Cross compiling server...
Building locally server...
Bootstrapping linux/arm-5...
go: github.com/gin-gonic/[email protected]: Get https://proxy.golang.org/github.com/gin-gonic/gin/@v/v1.6.3.mod: dial tcp 172.217.24.17:443: i/o timeout
2020/09/29 22:52:53 Failed to cross compile package: exit status 1.
@yinhonglu
Copy link

1、docker run -ti --name=xgo-build karalabe/xgo-latest /bin/sh
2、docker exec -ti xgo-build /bin/bash
3、go env -w GOPROXY=https://goproxy.cn,direct
4、docker ps -a, find xgo-build "CONTAINER ID"
5、docker commit -a “author” -m “message” “CONTAINER ID” karalabe/xgo-latest:v2
6、docker images, find karalabe/xgo-latest:v2 "IMAGE ID"
7、docker tag "IMAGE ID" karalabe/xgo-latest:latest

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants