Created
September 20, 2017 10:16
-
-
Save u1i/d25d30c75cfa2839044c472ef16439d6 to your computer and use it in GitHub Desktop.
Run a private Docker registry
This file contains hidden or 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
# Run a private registry | |
docker run -d -p 80:5000 --restart=always --name my_registry registry:2 | |
# Run a private registry with SSL cert and Basic Auth | |
# you should generate the certs and htpasswd file before | |
docker run -d -p 443:5000 --restart=always --name registry \ | |
-v /etc/ssl-certs:/certs \ | |
-v /opt/docker-registry:/var/lib/registry \ | |
-v `pwd`/auth:/auth \ | |
-e "REGISTRY_AUTH=htpasswd" \ | |
-e "REGISTRY_AUTH_HTPASSWD_REALM=My Private Docker Registry" \ | |
-e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd \ | |
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt \ | |
-e REGISTRY_HTTP_TLS_KEY=/certs/domain.key \ | |
registry:2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment