A global proxy for go modules. see: https://goproxy.io
It invokes the local go command to answer requests.
make
./bin/goproxy -listen=0.0.0.0:80 -cacheDir=/tmp/test
docker run -d -p80:8081 goproxy/goproxy
Use the -v flag to persisting the proxy module data (change cacheDir to your own dir):
docker run -d -p80:8081 -v cacheDir:/go goproxy/goproxy
docker-compose up
- set
export GOPROXY=http://localhost
to enable your goproxy. - set
export GOPROXY=
to disable it.