#!/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