update build helper script to optionally push to a docker registry
This commit is contained in:
parent
2ca3af5635
commit
5db42d05ab
4
build.sh
4
build.sh
@ -5,3 +5,7 @@ VERSION=$(git for-each-ref refs/tags --sort=-taggerdate --format='%(refname:shor
|
|||||||
|
|
||||||
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