Five-step setup for private Docker repository with Let's Encrypt SSL
Make sure you have a domain name and SSH access to an instance. This works well under a DigitalOcean's Ubuntu with Docker and Docker Compose installed.
- Set in
docker-compose.ymlthe REGISTRY_USER, REGISTRY_PASSWORD and DOMAIN on the Nginx args.
ssl_genset DOMAIN value with your domain.
docker-compose up -d
chmod +x *.sh && ./ssl_gen.sh
- After it succeeds, start it with
After it succeeds
docker login my-repo-url.comgive your user name/pass
- It should say
Automatic cron setup
This will schedule a renewal of the SSL cert with Let's Encrypt every 15 days.
crontab -u $USER -e
0 0 */15 * * /path/to/registry_files/ssl_renew.sh