In this section, we will emulate the concept of running Docker Registry securely using SSL. In the current scenario of running Docker Registry on localhost, Docker Engine needs to be secured using TLS.
Follow these steps to run Docker Registry securely:
- Getting certificates: We will be using self-signed certificates for TLS certificates. First create the certs directory, then run the openssl command:
$ mkdir certs
$ openssl req -newkey rsa:4096 -nodes -sha256 \
-keyout certs/domain.key -x509 -days 365 -out \
certs/domain.crt
Generating a 4096 bit RSA private key
.....................++
........................................
.........++
writing new private key to 'certs/domain.key'
-----
You are about to be asked to enter information
that will be incorporated into...