muse-workover
This commit is contained in:
@@ -139,9 +139,10 @@ _rootful_load_image $target_image=image_name $tag=default_tag:
|
||||
# If the image is found, load it into rootful podman
|
||||
ID=$(just sudoif podman images --filter reference="${target_image}:${tag}" --format "'{{ '{{.ID}}' }}'")
|
||||
if [[ "$ID" != "$USER_IMG_ID" ]]; then
|
||||
# If the image ID is not found or different from user, copy the image from user podman to root podman
|
||||
COPYTMP=$(mktemp -p "${PWD}" -d -t _build_podman_scp.XXXXXXXXXX)
|
||||
just sudoif TMPDIR=${COPYTMP} podman image scp ${UID}@localhost::"${target_image}:${tag}" root@localhost::"${target_image}:${tag}"
|
||||
# podman image scp ist deprecated (Podman 5) -> save/load verwenden
|
||||
COPYTMP=$(mktemp -p "${PWD}" -d -t _build_podman_load.XXXXXXXXXX)
|
||||
podman save "${target_image}:${tag}" -o "${COPYTMP}/image.tar"
|
||||
just sudoif podman load -i "${COPYTMP}/image.tar"
|
||||
rm -rf "${COPYTMP}"
|
||||
fi
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user