Go to the profile of  Leo
Leo
why do i need a bio? they are painful to write.
1 min read

How to connect Portainer in RancherOS to Docker Registry with SSL/TLS enabled

  1. Create a certificate authority
  2. Create client certificates
$ openssl genrsa -out client.key 4096
$ openssl req -new -x509 -text -key client.key -out client.cert

3. In host machine (Rancher OS), create the following folder if it doesn't exist yet

/etc/docker/certs.d/
└── your.registry.local          <-- Hostname without port
   ├── client.cert
   ├── client.key
   └── ca.crt

4. Note: The Docker daemon interprets .crt files as CA certificates and .cert files as client certificates. If a CA certificate is accidentally given the extension .cert instead of the correct .crt extension, the Docker daemon logs the following error message: