From fde7111a65698ece53bcbfa49716601b3e8c2d95 Mon Sep 17 00:00:00 2001 From: Damyan Yordanov Date: Wed, 25 Sep 2024 15:24:28 +0200 Subject: [PATCH] Make linker version configurable --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 237be4e..04ac063 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,9 +34,11 @@ FROM gcr.io/distroless/base-debian12 as distroless-base FROM distroless-base AS distroless-amd64 ENV LIB_DIR_PREFIX x86_64 +ENV LINKER=ld-linux-x86-64.so.2 FROM distroless-base AS distroless-arm64 ENV LIB_DIR_PREFIX aarch64 +ENV LINKER=ld-linux-aarch64.so.1 FROM distroless-$TARGETARCH AS output-image @@ -46,7 +48,7 @@ COPY --from=builder /workspace/fedhcp . COPY --from=installer /sbin/setcap /sbin/setcap COPY --from=installer /lib/${LIB_DIR_PREFIX}-linux-gnu/libcap.so.2 /lib/${LIB_DIR_PREFIX}-linux-gnu/libcap.so.2 COPY --from=installer /lib/${LIB_DIR_PREFIX}-linux-gnu/libc.so.6 /lib/${LIB_DIR_PREFIX}-linux-gnu/libc.so.6 -COPY --from=installer /lib/${LIB_DIR_PREFIX}-linux-gnu/ld-linux-x86-64.so.2 /lib/${LIB_DIR_PREFIX}-linux-gnu/ld-linux-x86-64.so.2 +COPY --from=installer /lib/${LIB_DIR_PREFIX}-linux-gnu/${LINKER} /lib/${LIB_DIR_PREFIX}-linux-gnu/${LINKER} COPY --from=installer /bin/sh /bin/sh RUN /sbin/setcap 'cap_net_bind_service,cap_net_raw=+ep' /fedhcp