#!/bin/bash IMAGE=${IMAGE:-"thealmightydrawingtablet/nfs-krb"} VERSION=$(git for-each-ref refs/tags --sort=-taggerdate --format='%(refname:short)' --count=1) docker build --progress=plain -t "${IMAGE}:alpine" -t "${IMAGE}:${VERSION}-alpine" . docker build --progress=plain -t "${IMAGE}:ubuntu" -t "${IMAGE}:${VERSION}-ubuntu" -f ./Dockerfile.ubuntu . if [ "$1" == "push" ]; then docker push --all-tags "${IMAGE}" fi