Created
January 14, 2017 16:42
-
-
Save pavelz/c9390c9d1bafc25c2987dfec7a9cd213 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# get your certs with certbot | |
# get passwd with 'docker run --entrypoint htpasswd registry:2 -Bbn testuser testpassword > auth/htpasswd' | |
docker run -d -p 5000:5000 \ | |
-v /etc/docker-registry:/auth \ | |
-e 'REGISTRY_AUTH="htpasswd"' \ | |
-e 'REGISTRY_AUTH_HTPASSWD_REALM="Registry Realm"' \ | |
-e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd \ | |
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/fullchain1.pem\ | |
-e REGISTRY_HTTP_TLS_KEY=/certs/privkey1.pem\ | |
--restart=always\ | |
-v /etc/letsencrypt/archive/docker.arslogi.ca:/certs\ | |
--name registry2 registry:2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment