21 lines
315 B
Bash
Executable file
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
|