diff --git a/Justfile b/Justfile index 1c3eabd8..764e0b37 100644 --- a/Justfile +++ b/Justfile @@ -171,15 +171,12 @@ ostree-rechunk $target_image=image_name $tag=default_tag: # Use the already-built local image to avoid pulling from a remote registry RPM_OSTREE_CHUNKER_IMAGE="localhost/${target_image}:${tag}" - RPM_OSTREE_OUTPUT_DIR="$(mktemp -d ./"${target_image}"_rpm-ostree_XXXXXX)" + GRAPHROOT="$(podman info --format '{{ '{{.Store.GraphRoot}}' }}')" - trap 'rm -rf "${RPM_OSTREE_OUTPUT_DIR}"' EXIT - - podman run --rm \ - --pull=never \ + podman run --rm --pull=never --privileged \ --mount=type=image,src="${target_image}:${tag}",target=/rpm-ostree \ - --privileged \ - -v "${RPM_OSTREE_OUTPUT_DIR}:/run/out:Z" \ + --mount=type=bind,src=${GRAPHROOT},target=/run/host-container-storage,rw \ + --mount=type=tmpfs,target=/run/rpm-ostree-storage \ --entrypoint /usr/bin/rpm-ostree \ "${RPM_OSTREE_CHUNKER_IMAGE}" \ compose build-chunked-oci \ @@ -187,10 +184,7 @@ ostree-rechunk $target_image=image_name $tag=default_tag: --format-version=2 \ --bootc \ --rootfs /rpm-ostree \ - --output oci-archive:/run/out/"${target_image}.oci" - - CHUNKED_IMAGE="$(podman pull oci-archive:"${RPM_OSTREE_OUTPUT_DIR}/${target_image}.oci")" - podman tag "${CHUNKED_IMAGE}" "${target_image}:${tag}" + --output "containers-storage:[overlay@/run/host-container-storage+/run/rpm-ostree-storage]localhost/${target_image}:${tag}" # Generate Default Tag [group('Utility')]