- docker images - lists the list of images in the local system
- docker pull - pull the image into the local system from the repository
- docker run -d -p 5000:5000 --restart=always --name registry -v $(pwd)/docker-registry:/var/lib/registry registry:latest - creates a image with the name registry and image as registry:latest with the volumes mapped form the local registry $(pwd)/docker-registry to the images /var/lib/registry.
- curl -X GET http://192.168.45.8:5000/v2/_catalog - checks out the registry repository at the endpoint 192.168.45.8:5000 with the docker registry servies has to be active
- docker tag nginx 192.168.45.8:5000/nginx - the new image called 192.168.45.8:5000/nginx is created which is tagged with nginx property.
- docker push 192.168.45.8:5000/nginx - this pushes the image nginx to the location 192.168.45.8:5000. but since the location sends HTTP response this command will fail. Get "https://192.168.45.8:5000/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
- sudo vim /etc/docker/daemon.json - place to list the connection characteristics.
- { "insecure-registries":["192.168.45.8:5000"], "experimental" : false } - add this set of lines in the daemon.json
- systemctl stop docker - to stop the docker demon
- systemctl start docker - to start the docker demon
- step and 8 and 9 are passed to restart the docker demon.
- retry the step4. - now the images is been to the local repository
- Now the image can be pulled from the local repository.
- The image pushed in the local repository can be accessed from the other node as well by setting the insecure connection of step5 and pass the pull command.