goproxy/README.md

30 lines
690 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-26 14:03:22 +00:00
./goproxy -listen=0.0.0.0:80 -cacheDir=/data
2018-10-17 03:40:42 +00:00
2018-12-29 08:36:36 +00:00
## Use docker image
2018-10-17 03:40:42 +00:00
2018-12-29 08:36:36 +00:00
docker run -d -p80:8081 goproxy/goproxy
2018-12-26 14:03:22 +00:00
Use the -v flag to persisting the proxy module data (change ___cacheDir___ to your own dir):
2018-12-29 08:36:36 +00:00
docker run -d -p80:8081 -v cacheDir:/go goproxy/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
2018-12-29 08:36:36 +00:00
1. set `export GOPROXY=http://localhost` to enable your goproxy.
2. set `export GOPROXY=` to disable it.