goproxy/README.md

33 lines
743 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-26 14:03:22 +00:00
## Docker build
2018-10-17 03:40:42 +00:00
2018-12-26 14:03:22 +00:00
docker build . --no-cache -t goproxy/goproxy:latest
2018-10-17 03:40:42 +00:00
2018-12-26 14:03:22 +00:00
## Docker run
2018-10-17 03:40:42 +00:00
2018-12-26 14:03:22 +00:00
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
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