1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-16 03:48:44 +00:00

registry mirror

This commit is contained in:
kev 2016-08-27 19:44:32 +08:00
parent b1ef5971ad
commit 7cf0c920b8
2 changed files with 13 additions and 3 deletions

@ -7,10 +7,11 @@ registry
```yaml
registry:
image: registry:2
image: registry
ports:
- "5000:5000"
volumes:
- /etc/docker/registry
- ./data:/var/lib/registry
- ./certs:/certs
- ./auth:/auth
@ -27,9 +28,16 @@ registry:
```bash
$ docker-compose up -d
$ docker-compose exec registry bash
$ docker-compose exec registry sh
>>> htpasswd -Bbn username password >> /auth/htpasswd
>>> cat >> /etc/docker/registry/config.yml
proxy:
remoteurl: https://registry-1.docker.io
username: username
password: password
^D
>>> exit
$ docker-compose restart
$ docker pull alpine
$ docker tag alpine registry.easypi.info:5000/alpine
@ -44,5 +52,6 @@ $ docker pull registry.easypi.info:5000/alpine
- https://github.com/docker/distribution/blob/master/docs/deploying.md
- https://github.com/docker/distribution/blob/master/docs/insecure.md
- https://serversforhackers.com/tcp-load-balancing-with-nginx-ssl-pass-thru
- https://github.com/docker/distribution/blob/master/docs/recipes/mirror.md
[1]: https://github.com/docker/distribution

@ -1,8 +1,9 @@
registry:
image: registry:2
image: registry
ports:
- "5000:5000"
volumes:
- /etc/docker/registry
- ./data:/var/lib/registry
- ./certs:/certs
- ./auth:/auth