34 lines
629 B
Bash
34 lines
629 B
Bash
TAG=develop
|
|
IMAGE=dasmoorhuhn/atc-mithermometer-gateway
|
|
HELP="USAGE: sh build_docker.sh \n
|
|
[ -t | --tag ] Select a tag for building. Default is develop \n
|
|
[ -i | --image ] Select image tag for building. Default is dasmoorhuhn/atc-mithermometer-gateway \n
|
|
[ -h | --help ] Get this dialog"
|
|
|
|
docker_build(){
|
|
docker build --tag $IMAGE:$TAG .
|
|
}
|
|
|
|
while [ "$1" != "" ]; do
|
|
case $1 in
|
|
-t | --tag )
|
|
shift
|
|
TAG=$1
|
|
shift
|
|
;;
|
|
-i | --image )
|
|
shift
|
|
IMAGE=$1
|
|
shift
|
|
;;
|
|
-h | --help )
|
|
echo $HELP
|
|
exit
|
|
;;
|
|
* )
|
|
echo $HELP
|
|
exit 1
|
|
esac
|
|
done
|
|
|
|
docker_build |