goproxy/README.md

29 lines
671 B
Markdown
Raw Normal View History

2018-09-03 08:35:48 +00:00
2018-09-05 02:38:42 +00:00
# GOPROXY [![CircleCI](https://circleci.com/gh/goproxyio/goproxy.svg?style=svg)](https://circleci.com/gh/goproxyio/goproxy)
2018-09-03 08:35:48 +00:00
2018-09-05 02:38:42 +00:00
A global proxy for go modules. see: [https://goproxy.io](https://goproxy.io)
2018-09-03 08:35:48 +00:00
## Build
2018-12-24 07:51:40 +00:00
go generate
2018-09-03 08:35:48 +00:00
go build
## Started
2018-12-25 11:53:45 +00:00
./goproxy -listen=0.0.0.0:80 -cacheDir=/cache
2018-10-17 03:40:42 +00:00
## Docker
2018-12-24 07:51:40 +00:00
docker run --name goproxy -d -p80:8081 goproxyio/goproxy
2018-10-17 03:40:42 +00:00
Use the -v flag to persisting the proxy module data (change ___go_repo___ to your own dir):
2018-12-25 11:53:45 +00:00
docker run --name goproxy -d -p80:8081 -v go_repo:/cache goproxyio/goproxy
2018-10-17 03:40:42 +00:00
## Docker Compose
docker-compose up
2018-12-24 07:51:40 +00:00
## Appendix
2018-12-25 11:53:45 +00:00
1. set `$GOPROXY` to change your proxy or disable the proxy