2024-10-22 00:49:37 -04:00
|
|
|
#! /bin/bash
|
|
|
|
|
2024-12-02 23:32:33 -05:00
|
|
|
image_name="$1"
|
2024-10-22 00:49:37 -04:00
|
|
|
|
2024-12-02 23:32:33 -05:00
|
|
|
if [[ -z "$1" ]]; then
|
|
|
|
echo "Missing image name argument!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
podman build . -t "$image_name":latest -f "$image_name".Containerfile && \
|
2024-10-22 00:49:37 -04:00
|
|
|
podman save localhost/"$image_name":latest -o "$image_name".img && \
|
2024-12-02 23:32:33 -05:00
|
|
|
rm -fv "$image_name".sif && \
|
2024-10-22 00:49:37 -04:00
|
|
|
apptainer pull "$image_name".sif docker-archive:"$image_name".img
|
2024-12-02 23:32:33 -05:00
|
|
|
rm -v "$image_name".img
|