First version with user/password auth
This commit is contained in:
45
registry.sh
Executable file
45
registry.sh
Executable file
@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
OPTION=$1
|
||||
# Functions
|
||||
usage()
|
||||
{
|
||||
cat << EOF
|
||||
usage: $0 options
|
||||
|
||||
Quickly manage a simple docker registry.
|
||||
|
||||
OPTIONS:
|
||||
c Create user config
|
||||
s Start registry
|
||||
d Stop registry
|
||||
h Show help
|
||||
EOF
|
||||
}
|
||||
|
||||
genUser()
|
||||
{
|
||||
"$PWD"/scripts/gen_user.sh
|
||||
}
|
||||
startContainer()
|
||||
{
|
||||
docker compose up -d
|
||||
}
|
||||
stopContainer()
|
||||
{
|
||||
docker compose stop
|
||||
}
|
||||
|
||||
case "$OPTION"
|
||||
in
|
||||
h)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
c) genUser;;
|
||||
s) startContainer;;
|
||||
d) stopContainer;;
|
||||
*)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user