update build helper script to optionally push to a docker registry

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-10-29 17:11:29 -04:00
parent 2ca3af5635
commit 5db42d05ab
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

View File

@ -4,4 +4,8 @@ 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 .
docker build --progress=plain -t "${IMAGE}:ubuntu" -t "${IMAGE}:${VERSION}-ubuntu" -f ./Dockerfile.ubuntu .
if [ "$1" == "push" ]; then
docker push --all-tags "${IMAGE}"
fi