Skip to content

Instantly share code, notes, and snippets.

@v-thomp4
Created July 12, 2020 03:29
Show Gist options
  • Save v-thomp4/6d4a3c214208987534d17ecf3746641e to your computer and use it in GitHub Desktop.
Save v-thomp4/6d4a3c214208987534d17ecf3746641e to your computer and use it in GitHub Desktop.
docker registry
htpasswd -Bbn user pass > auth/htpasswd
docker run -it -d --restart=unless-stopped \
-p 5000:5000 --name registry -v "$(pwd)"/auth:/auth \
-e "REGISTRY_AUTH=htpasswd" -e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" \
-e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd registry:2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment