16 lines
410 B
Bash
Executable File
16 lines
410 B
Bash
Executable File
#! /bin/bash
|
|
|
|
containerfile_name="$1"
|
|
image_name="${containerfile_name%.*}"
|
|
|
|
if [[ -z "$1" ]]; then
|
|
echo "Missing image name argument!"
|
|
exit 1
|
|
fi
|
|
|
|
podman build . -t "$image_name":latest -f "$containerfile_name" && \
|
|
podman save localhost/"$image_name":latest -o "$image_name".img && \
|
|
rm -fv "$image_name".sif && \
|
|
apptainer pull "$image_name".sif docker-archive:"$image_name".img
|
|
rm -v "$image_name".img
|