Contents:
Docker Registry is a stateless, highly scalable server side application that stores and lets you distribute Docker images. The Registry is open-source, under the permissive Apache license.
You should use the Registry if you want to:
Run under command:
docker run -d -p 5000:5000 --restart=always --name registry-srv registry:2
Explain:
Make config file:
mkdir -p /opt/conf cd /opt/conf nano config.yml
File content:
registry: # Docker registry url url: http://registry-srv:5000/v2 # Docker registry fqdn name: localhost:5000 # To allow image delete, should be false readonly: false auth: # Disable authentication enabled: false
Explain:
Install Web UI for Registry :
docker run -it -p 8080:8080 --restart=always --name registry-web --link registry-srv -v $(pwd)/config.yml:/conf/config.yml:ro hyper/docker-registry-web
Explain:
Access http://IP:8080
Pull Centos Image
[root@localhost ~]# docker pull centos:latest Trying to pull repository docker.io/library/centos ... latest: Pulling from docker.io/library/centos aeb7866da422: Pull complete Digest: sha256:67dad89757a55bfdfabec8abd0e22f8c7c12a1856514726470228063ed86593b Status: Downloaded newer image for docker.io/centos:latest [root@localhost ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE docker.io/centos latest 75835a67d134 33 hours ago 200 MB [root@localhost ~]#
Make image tag
docker image tag centos 192.168.1.93:5000/centos:latest
Push image to Docker Registry
Https error:
[root@localhost ~]# docker push 192.168.1.93:5000/centos:latest The push refers to a repository [192.168.1.93:5000/centos] Get https://192.168.1.93:5000/v1/_ping: http: server gave HTTP response to HTTPS client
How to Fix?
Try push image again
[root@localhost ~]# docker push 192.168.1.93:5000/centos:latest The push refers to a repository [192.168.1.93:5000/centos] f972d139738d: Pushed latest: digest: sha256:dc29e2bcceac52af0f01300402f5e756cc8c44a310867f6b94f5f7271d4f3fec size: 529
Refresh Web UI page
Try pull pushed image
[root@localhost ~]# docker pull 192.168.1.93:5000/centos:latest Trying to pull repository 192.168.1.93:5000/centos ... latest: Pulling from 192.168.1.93:5000/centos aeb7866da422: Pull complete Digest: sha256:dc29e2bcceac52af0f01300402f5e756cc8c44a310867f6b94f5f7271d4f3fec Status: Downloaded newer image for 192.168.1.93:5000/centos:latest
An alternative for the nmcli is the nmtui, short for Network Manager Text User Interface,…
MariaDB is an enhanced, drop-in replacement for MySQL. MariaDB can be a better choice for…
MariaDB is an enhanced, drop-in replacement for MySQL. MariaDB can be a better choice for…
Rclone is a command line program written in Go language, used to sync files and…
By default, authentication is disabled in MongoDB, but this is not so critical as, out…
What is Pip? pip is a tool for installing and managing Python packages. With pip…
Leave a Comment