From c0d06f46e65e3c1f577a63e4e4d3c152a79ecb9a Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Sun, 6 Dec 2026 11:34:39 +0100 Subject: [PATCH] Immich: unpack the base image without restoring its owners (#19323) A container whose idmap leaves out uid 1000 (a common bind-mount setup) failed the unpack with "lchown /home/node: invalid argument" and was told it needs Proxmox VE 9.1. Only /usr/local is used, which is root-owned either way. --- ct/immich.sh | 4 ++-- install/immich-install.sh | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ct/immich.sh b/ct/immich.sh index d16998b49..a198a575c 100644 --- a/ct/immich.sh +++ b/ct/immich.sh @@ -464,9 +464,9 @@ function fetch_prebuilt_libs() { msg_error "Could not download Immich's base image (${image}). Immich was not updated." exit 115 fi - if ! $STD umoci unpack --image "${oci_dir}:img" "$PREBUILT_BUNDLE"; then + if ! $STD umoci unpack --rootless --image "${oci_dir}:img" "$PREBUILT_BUNDLE"; then rm -rf "$oci_dir" "$PREBUILT_BUNDLE" - msg_error "Could not unpack Immich's base image. Immich needs Proxmox VE 9.1 or newer; it was not updated." + msg_error "Could not unpack Immich's base image. Immich was not updated." exit 105 fi rm -rf "$oci_dir" diff --git a/install/immich-install.sh b/install/immich-install.sh index 86356a803..8296352a7 100644 --- a/install/immich-install.sh +++ b/install/immich-install.sh @@ -204,7 +204,7 @@ export LD_RUN_PATH=/usr/local/lib # Immich ships the custom photo-processing libraries (libjxl, jpegli, libheif, # libraw, ImageMagick, libvips) prebuilt in its own OCI base image. Pull the one # the release's Dockerfile pins (skopeo + umoci, no container runtime) and use its -# /usr/local. There is no compile fallback: this needs Proxmox VE 9.1 or newer. +# /usr/local. There is no compile fallback. msg_info "Deploying prebuilt image-processing libraries" BASE_REF="$(curl -fsSL "https://raw.githubusercontent.com/immich-app/immich/${RELEASE}/server/Dockerfile" | awk '/^FROM ghcr.io\/immich-app\/base-server-dev/ {print $2; exit}')" || true if [[ -z "$BASE_REF" ]]; then @@ -225,9 +225,11 @@ if ! $STD skopeo copy --retry-times 3 --override-os linux --override-arch "$(arc msg_error "Could not download Immich's base image (${BASE_IMAGE})." exit 115 fi -if ! $STD umoci unpack --image "${OCI_DIR}:img" "$OCI_BUNDLE"; then +# --rootless skips restoring the image's owners: a container whose idmap leaves out +# one of them (uid 1000 for bind mounts) fails lchown with "invalid argument". +if ! $STD umoci unpack --rootless --image "${OCI_DIR}:img" "$OCI_BUNDLE"; then rm -rf "$OCI_DIR" "$OCI_BUNDLE" - msg_error "Could not unpack Immich's base image. Immich needs Proxmox VE 9.1 or newer." + msg_error "Could not unpack Immich's base image." exit 105 fi # The libraries, headers and ImageMagick data, without the node runtime, global