update build helper script to optionally push to a docker registry
This commit is contained in:
parent
2ca3af5635
commit
5db42d05ab
6
build.sh
6
build.sh
@ -4,4 +4,8 @@ IMAGE=${IMAGE:-"thealmightydrawingtablet/nfs-krb"}
|
|||||||
VERSION=$(git for-each-ref refs/tags --sort=-taggerdate --format='%(refname:short)' --count=1)
|
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}: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
|
||||||
Loading…
x
Reference in New Issue
Block a user