dynamicweb/build-image.sh

24 lines
403 B
Bash
Raw Normal View History

2024-02-17 09:27:44 +00:00
#!/bin/sh
if [ $# -lt 1 ]; then
echo "$0 imageversion [push]"
2024-02-17 11:49:31 +00:00
echo "Version could be: $(git describe --always)"
2024-02-17 09:27:44 +00:00
echo "If push is specified, also push to our harbor"
exit 1
fi
tagprefix=harbor.k8s.ungleich.ch/ungleich-public/dynamicweb
version=$1; shift
tag=${tagprefix}:${version}
2024-02-17 11:49:31 +00:00
set -ex
2024-02-17 09:27:44 +00:00
docker build -t "${tag}" .
push=$1; shift
if [ "$push" ]; then
docker push "${tag}"
fi