From 2a94fbb886b7e2ac4c6ab1dc0fabbc9a697eb846 Mon Sep 17 00:00:00 2001 From: "Timothy J. Raymond" Date: Wed, 13 Nov 2024 11:43:40 -0500 Subject: [PATCH] Add glibc to operator's final image As a consequence of removing CGO_ENABLED=0, we now require glibc in the final runtime environment of both retina-agent and retina-operator. `retina-agent` had this already by consequence of the inclusion of clang and other machinery necessary to compile ebpf. `retina-operator`, however, did not. This adds the contents of /lib and /usr/lib to the final image in order to include glibc into `retina-operator`'s runtime environment. --- operator/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/operator/Dockerfile b/operator/Dockerfile index 80ae31a663..23f5e877e5 100644 --- a/operator/Dockerfile +++ b/operator/Dockerfile @@ -26,6 +26,8 @@ RUN --mount=type=cache,target="/root/.cache/go-build" \ # mcr.microsoft.com/cbl-mariner/distroless/minimal:2.0 FROM --platform=$BUILDPLATFORM mcr.microsoft.com/cbl-mariner/distroless/minimal@sha256:db87903c5d4d9d6760e86a274914efd6a3bb5914c0b5a6c6b35350ec297fea4f WORKDIR / +COPY --from=builder /lib /lib +COPY --from=builder /usr/lib/ /usr/lib COPY --from=builder /workspace/retina-operator . USER 65532:65532