mirror of https://github.com/goproxyio/goproxy
b0865d643c | ||
---|---|---|
.circleci | ||
build | ||
pkg/proxy | ||
scripts | ||
.gitignore | ||
Dockerfile | ||
LICENSE | ||
README.md | ||
circle-test.sh | ||
docker-compose.yaml | ||
go.mod | ||
main.go |
README.md
GOPROXY
A global proxy for go modules. see: https://goproxy.io
Build
go generate
go build
Started
./goproxy -listen=0.0.0.0:80 -cacheDir=/data
Docker build
docker build . --no-cache -t goproxy/goproxy:latest
Docker run
docker run --name goproxy -d -p80:8081 goproxy/goproxy
Use the -v flag to persisting the proxy module data (change cacheDir to your own dir):
docker run --name goproxy -d -p80:8081 -v cacheDir:/go goproxy/goproxy
Docker Compose
docker-compose up
Appendix
- set
$GOPROXY
to change your proxy or disable the proxy