Docker Docker private/secure registry with API v2

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!


A private and secure docker registry instead of a Docker Hub. Basic docker skills are required.


sudo docker run -p 5000:5000Start a docker container and bind the port 5000 from container to the port 5000 of the physical machine.
--name registryContainer name (use to make “docker ps” readability better).
-v 'pwd'/certs:/certsBind CURRENT_DIR/certs of the physical machine on /certs of the container (like a “shared folder”).
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/server.crtWe specify that the registry should use /certs/server.crt file to start. (env variable)
-e REGISTRY_HTTP_TLS_KEY=/certs/server.keySame for the RSA key (server.key).
-v /root/images:/var/lib/registry/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.
registry:2We 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.


Got any Docker Question?