#!/bin/sh if ! which podman > /dev/null 2>&1; then echo "podman is not in your path" exit 1 fi PGVER="${1}" PGALTVER="${2}" if [ "${PGVER}" = "" ]; then echo "usage: $(basename "${0}") PGVER [PGALTVER]" exit 1 fi if [ "${PGALTVER}" = "" ]; then PGALTVER="${PGVER}" fi CONTAINER_DIR="$(dirname "$(realpath "${0}")")" CONTAINER_TAG="pg_proctab:${PGALTVER}" cd "${CONTAINER_DIR}/.." && \ podman build \ --isolation=chroot \ --build-arg PGVER="${PGVER}" \ --build-arg PGALTVER="${PGALTVER}" \ -t "${CONTAINER_TAG}" \ .