ungleich-containers/build.sh
Nico Schottelius 6de16ffd27 update build.sh
2024-02-20 22:15:55 +09:00

21 lines
315 B
Bash
Executable file

#!/bin/sh
set -exu
if [ $# -lt 2 ]; then
echo "$0 <container> <version> [push]" >&2
exit 1
fi
container=$1; shift
version=$1; shift
name=harbor.k8s.ungleich.ch/ungleich-public/${container}
tag=${name}:${version}
cd $container
docker build -t ${tag} .
if [ "$#" -ge 1 ]; then
docker push ${tag}
fi