mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-01-08 04:04:18 +02:00
registry mirror
This commit is contained in:
parent
b1ef5971ad
commit
7cf0c920b8
@ -7,10 +7,11 @@ registry
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
registry:
|
registry:
|
||||||
image: registry:2
|
image: registry
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
volumes:
|
volumes:
|
||||||
|
- /etc/docker/registry
|
||||||
- ./data:/var/lib/registry
|
- ./data:/var/lib/registry
|
||||||
- ./certs:/certs
|
- ./certs:/certs
|
||||||
- ./auth:/auth
|
- ./auth:/auth
|
||||||
@ -27,9 +28,16 @@ registry:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker-compose up -d
|
$ docker-compose up -d
|
||||||
$ docker-compose exec registry bash
|
$ docker-compose exec registry sh
|
||||||
>>> htpasswd -Bbn username password >> /auth/htpasswd
|
>>> 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
|
>>> exit
|
||||||
|
$ docker-compose restart
|
||||||
|
|
||||||
$ docker pull alpine
|
$ docker pull alpine
|
||||||
$ docker tag alpine registry.easypi.info:5000/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/deploying.md
|
||||||
- https://github.com/docker/distribution/blob/master/docs/insecure.md
|
- https://github.com/docker/distribution/blob/master/docs/insecure.md
|
||||||
- https://serversforhackers.com/tcp-load-balancing-with-nginx-ssl-pass-thru
|
- 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]: https://github.com/docker/distribution
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
registry:
|
registry:
|
||||||
image: registry:2
|
image: registry
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
volumes:
|
volumes:
|
||||||
|
- /etc/docker/registry
|
||||||
- ./data:/var/lib/registry
|
- ./data:/var/lib/registry
|
||||||
- ./certs:/certs
|
- ./certs:/certs
|
||||||
- ./auth:/auth
|
- ./auth:/auth
|
||||||
|
Loading…
Reference in New Issue
Block a user