fix(docker): stage curl libs under /usr/lib64, not /lib64
CI / Build Native (push) Failing after 24m54s
CI / Build Native (push) Failing after 24m54s
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.
This commit is contained in:
+2
-1
@@ -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/
|
||||
|
||||
Reference in New Issue
Block a user