mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-24 08:52:31 +02:00
update registry
This commit is contained in:
parent
4ec5284767
commit
226508fde4
@ -60,20 +60,31 @@ proxy:
|
|||||||
$ docker-compose restart
|
$ docker-compose restart
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> :warning: You cannot use it as registry+mirror at the same time.
|
||||||
|
|
||||||
## Client Setup
|
## Client Setup
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ scp registry.easypi.info:fig/registry/certs/domain.crt \
|
$ scp registry.easypi.info:fig/registry/certs/domain.crt \
|
||||||
/etc/docker/certs.d/registry.easypi.info:5000/ca.crt
|
/etc/docker/certs.d/registry.easypi.info:5000/ca.crt
|
||||||
|
|
||||||
$ systemctl edit docker
|
$ vim /etc/docker/daemon.json
|
||||||
# /etc/systemd/system/docker.service.d/override.conf
|
{
|
||||||
[Service]
|
"registry-mirrors": [
|
||||||
ExecStart=
|
"https://registry.easypi.info:5000"
|
||||||
ExecStart=/usr/bin/dockerd -H fd:// --registry-mirror https://registry.easypi.info:5000
|
],
|
||||||
|
"insecure-registries": [
|
||||||
|
"registry.easypi.info"
|
||||||
|
],
|
||||||
|
"log-driver": "json-file",
|
||||||
|
"log-opts": {
|
||||||
|
"max-size": "10m",
|
||||||
|
"max-file": "3"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$ systemctl daemon-reload
|
$ systemctl reload docker
|
||||||
$ systemctl restart docker
|
$ docker info
|
||||||
|
|
||||||
$ docker pull alpine
|
$ docker pull alpine
|
||||||
$ docker tag alpine registry.easypi.info:5000/alpine
|
$ docker tag alpine registry.easypi.info:5000/alpine
|
||||||
@ -86,14 +97,14 @@ $ docker pull registry.easypi.info:5000/alpine
|
|||||||
$ firefox http://registry.easypi.info:8080
|
$ firefox http://registry.easypi.info:8080
|
||||||
```
|
```
|
||||||
|
|
||||||
> Append `--insecure-registry registry.easypi.info:5000` option to disable TLS.
|
> :warning: Docker will connect [insecure-registries][2] via HTTPS first (ignore TLS error), then try HTTP.
|
||||||
|
|
||||||
## Read More
|
## Read More
|
||||||
|
|
||||||
- https://docs.docker.com/registry/insecure/#deploy-a-plain-http-registry
|
|
||||||
- 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
|
- https://github.com/docker/distribution/blob/master/docs/recipes/mirror.md
|
||||||
|
|
||||||
[1]: https://github.com/docker/distribution
|
[1]: https://github.com/docker/distribution
|
||||||
|
[2]: https://docs.docker.com/registry/insecure/#deploy-a-plain-http-registry
|
||||||
|
Loading…
Reference in New Issue
Block a user