Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- set -e
- if [ -z "$1" ]
- then
- echo "Missing destination file parameter."
- echo "Usage: $0 path/to/dest"
- echo "Example: $0 /srv/registry/security/htpasswd"
- exit 1;
- fi
- DEST=$1
- echo "Enter the new username:"
- read -r USERNAME
- echo "Enter the associated password:"
- read -rs PASSWORD
- docker run registry:2 htpasswd -Bbn ${USERNAME} ${PASSWORD} >> $DEST
Add Comment
Please, Sign In to add comment