#!/bin/bash -e dkr() { local shell="$1"; shift (set -x podman run --rm -it -v "$PWD:/mnt/" -w /mnt/ --entrypoint "$shell" \ "$img" "$@" ) } declare -A aliases=( [arch]=quay.io/archlinux/archlinux:base [debian]=docker.io/debian:12-slim [kaniko]=gcr.io/kaniko-project/executor:debug ) if [ -z "$1" ]; then exit 1 fi if [ -n "${aliases[$1]}" ]; then img="${aliases[$1]}" else img="docker.io/$1" [[ "$img" == *:* ]] || img+=:latest fi shift dkr bash "$@" if [ "$?" = 127 ]; then dkr sh "$@" fi