From 3c189ae9c4d0e657110d544e9b994167337b7504 Mon Sep 17 00:00:00 2001 From: Daniel Arroyo Date: Thu, 13 Aug 2026 21:09:56 -0400 Subject: [PATCH] fix(docker): stage curl libs under /usr/lib64, not /lib64 ldd reports library paths as /lib64/... (the legacy short path). quarkus-micro-image:2.0 has /lib64 as a symlink to /usr/lib64, so COPY --from=curl-builder /out/ / collides when trying to write into /lib64 (cannot copy to non-directory). The fix: in the curl-builder stage, translate /lib64 -> /usr/lib64 (and /lib -> /usr/lib) before installing each library, so the final image gets libs under /usr/lib64 and doesn't touch the /lib64 symlink. --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 612e999..fbb74d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,8 @@ RUN microdnf install -y curl-minimal && microdnf clean all \ && mkdir -p /out/etc/pki /out/etc \ && install -D -m 0755 /usr/bin/curl /out/usr/bin/curl \ && for lib in $(ldd /usr/bin/curl | awk '/=>/ {print $3}' | sort -u); do \ - install -D -m 0755 "$lib" "/out$lib"; \ + dest="/out$(echo "$lib" | sed 's|^/lib64|/usr/lib64|; s|^/lib|/usr/lib|')"; \ + install -D -m 0755 "$lib" "$dest"; \ done \ && cp -rP /etc/pki/ca-trust /out/etc/pki/ \ && cp -rP /etc/ssl /out/etc/