runner-images/script/build-image.sh
Marc Cataford 8c9aad6be3
Some checks failed
/ build-images (ubuntu-2204) (push) Has been cancelled
feat: set up ubuntu base image build
ci: tag image as latest
2024-07-20 16:33:16 -04:00

19 lines
318 B
Bash
Executable file

#!/bin/bash
image_name=$1
image_tag=$2
if [[ -z $image_name ]]; then
echo "An image name must be provided."
exit 1
fi
if [[ -z $image_tag ]]; then
echo "An image tag must be provided."
exit 1
fi
(
cd "images/$image_name"
podman build -t "$image_name:$image_tag" -f ./Dockerfile
) || exit 1