A SECURE DOCKER 2.0 REGISTRY WITH BASIC AUTHENTICATION
- letsencrypt
- docker and docker-compose
- create a valid letsencrypt certificate for your domain - check this tutorial
- split your certificate into a cert and a key (run
bin/generate-key-cert-from-pem <path/to/letsencrypt/live/>
) - generate a httpasswd file (run
bin/generate-htpasswd <username> <password>
) - install the expected directories (run
bin/install.sh
) - expose the domain to the container (export DOMAIN="my.domain.fr")
- go to /containers/registry and run
docker-compose up -d
- add cert renew to crontab, for example:
0 2 1 * * /containers/registry/bin/renew-certs my.domain.fr