Docker Docker private/secure registry with API v2 Run the registry with self-signed certificate

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!

Example

To run the private registry (securely) you have to generate a self-signed certificate, you can refer to previous example to generate it.

For my example I put server.key and server.crt into /root/certs

Before run docker command you should be placed (use cd) into the directory that contains certs folder. If you're not and you try to run the command you'll receive an error like

level=fatal msg="open /certs/server.crt: no such file or directory"

When you are (cd /root in my example), you can basically start the secure/private registry using : sudo docker run -p 5000:5000 --restart=always --name registry -v `pwd`/certs:/certs -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/server.crt -e REGISTRY_HTTP_TLS_KEY=/certs/server.key -v /root/Documents:/var/lib/registry/ registry:2
Explanations about the command is available on Parameters part.



Got any Docker Question?