mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-12-06 15:54:48 +01:00
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.
This commit is contained in:
1 parent
a9845be53d
commit
c0d06f46e6
2 files changed
+7
-5
No files matched your search
+2
-2
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user