runner-images/script/build-image.sh
Marc Cataford 2c327feed2
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:03:40 -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