Files
code/build.sh

24 lines
448 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
shopt -s extglob
readonly DIR="$(cd "$(dirname "$0")"; pwd)"
if (( $# == 0 )); then
readonly images=(core basic !(template|core|basic)/)
else
readonly images=("$@")
fi
for image in "${images[@]}"; do
if [[ "$image" == '.' ]]; then
tag="$(basename "$(pwd)")"
contdir='.code'
else
tag="$image"
contdir="$DIR/${image%/}"
fi
podman build -t "code-${tag}" -f "${contdir}/Containerfile"
done