In this episode I will step through the creation of a private Docker Registry that is password protected and over SSL. Registry service run in a container on a DigitalOcean droplet using docker machine and docker compose.
If you don’t have a DigitalOcean account, Register now and get some credit and that should get you running a droplet for about 2 months – https://m.do.co/c/a9b9aef156d6
Following are the steps to walk through,
- Create a digitalocean droplet as docker host using Docker Machine
- Using Docker Compose, define Nginx service and run on the docker host on the droplet
- Create a public domain name and point it to the droplet IP address
- Update Docker Compose to add registry service and test the access through Nginx
- Configure SSL on nginx using certificate from sslforfree.com (Let’s Encrypt CA issued)
- Enabled basic authentication to allow only authorized users access the registry
- Tag images and push to the private registry; and pull from the private registry.