Athens:香港服务器Docker部署

源起

go1.11开始加入module功能支持GOPROXY,解决go依赖包下载问题(你懂的!),Athens应运而生。

官网介绍:

Athens is a project building on top of vgo (or go1.11+) trying to bring dependencies closer to you so you can count on repeatable builds even at a time when VCS is down.

The big goal of Athens is to provide a new place where dependencies — not code — live. Dependencies are immutable blobs of code and associated metadata that come from Github. They live in storage that Athens controls.

Docker部署

使用Docker进行部署,官方镜像[gomods/proxy:latest](https://hub.docker.com/r/gomods/proxy/ ‘Athens’s docker image’)

$ docker volume create data-athens
$ docker run -d --name athens-proxy --restart always -p 3000:3000 \
    -v data-athens:/var/lib/athens \
    -e ATHENS_DISK_STORAGE_ROOT=/var/lib/athens \ 
    -e ATHENS_STORAGE_TYPE=disk \
    gomods/proxy:latest

Use Memory Backend (Defualt)

$ docker run -d --name athens-proxy --restart always -p 3000:3000 gomods/proxy:latest
$ docker logs -f athens-proxy # display logs
 Hello, Rustacean AppArmor的前世今生和基本使用 

Comments