The security of Docker Registry is very vital. It is recommended that you run it behind the secure firewall and Intrusion Protection System (IPS) / Intrusion Defense System (IDS) in a secure network. Also, it is assumed that registry will only accept a secure connection on HTTPS. In addition to these, Docker Registry can provide access restriction, and the simplest way to implement this is through basic authentication. The basic authentication is standard authentication with web servers using a login name and password:
$ mkdir auth
$ sudo docker run --entrypoint htpasswd
registry:2 -Bbn testvinod testpassword > auth/htpasswd
$
Here we list out the steps to be done for securely accessing Docker Registry:
- Since we are running this registry in the secure mode, use a self-signed certificate and enable TLS.
- Also, restart the Docker process to get the updated configuration...