Skip to content

Commit

Permalink
Make linker version configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
damyan committed Sep 25, 2024
1 parent 879023f commit 8a5a620
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check warning on line 36 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildAndPush

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
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

Expand All @@ -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
Expand Down

0 comments on commit 8a5a620

Please sign in to comment.