improve docker.registry configuration
parent
647d33c2a9
commit
1b1ecf1f11
|
|
@ -2,6 +2,32 @@
|
|||
|
||||
more details on: https://docs.docker.com/registry/deploying/
|
||||
|
||||
## Registry Register In Dockerd
|
||||
|
||||
if you use https-portal just skip this stage.
|
||||
|
||||
before usage, we have to configure insecure registry usage in dockerd (https://docs.docker.com/registry/insecure/)
|
||||
|
||||
we have to check default deamon config file path:
|
||||
|
||||
```bash
|
||||
dockerd --help | grep config-file
|
||||
```
|
||||
|
||||
it should be:
|
||||
|
||||
```bash
|
||||
--config-file string Daemon configuration file (default "/etc/docker/daemon.json")
|
||||
```
|
||||
|
||||
open ```etc/docker/deamon.json``` file (If the daemon.json file does not exist, create it.) and append these lines:
|
||||
|
||||
```json
|
||||
{
|
||||
"insecure-registries" : ["http://0.0.0.0:5050"]
|
||||
}
|
||||
```
|
||||
|
||||
## Registry Usage
|
||||
|
||||
its really simply:
|
||||
|
|
@ -9,13 +35,18 @@ its really simply:
|
|||
```bash
|
||||
docker pull ubuntu
|
||||
|
||||
docker tag ubuntu 00x097/ubuntu
|
||||
docker tag ubuntu:latest 0.0.0.0:5050/00x097/ubuntu:latest
|
||||
|
||||
docker push 0.0.0.0:5050/ubuntu
|
||||
docker push 0.0.0.0:5050/00x097/ubuntu:latest
|
||||
```
|
||||
|
||||
```0.0.0.0:5050``` is custom registry address
|
||||
```00x097``` is user name
|
||||
```ubuntu``` is image / repository name
|
||||
```:latest``` is version of image (is optional - ```latest``` is default)
|
||||
|
||||
if you use https-portal, check out this:
|
||||
|
||||
```bash
|
||||
docker push docker-registry.tk/ubuntu
|
||||
docker push docker-registry.tk/00x097/ubuntu:latest
|
||||
```
|
||||
Loading…
Reference in New Issue