A private and secure docker registry instead of a Docker Hub. Basic docker skills are required.
|sudo docker run -p 5000:5000
|Start a docker container and bind the port 5000 from container to the port 5000 of the physical machine.
|Container name (use to make “docker ps” readability better).
|Bind CURRENT_DIR/certs of the physical machine on /certs of the container (like a “shared folder”).
|We specify that the registry should use /certs/server.crt file to start. (env variable)
|Same for the RSA key (server.key).
|If you want to save all your registry images you should do this on the physical machine. Here we save all images on /root/images on the physical machine. If you do this then you can stop and restart the registry without losing any images.
|We specify that we would like to pull the registry image from docker hub (or locally), and we add « 2 » because we want install the version 2 of registry.