From 86ecf0afece89033a1964feb6b7bedd0bd85d075 Mon Sep 17 00:00:00 2001 From: Marco Franssen Date: Tue, 29 Oct 2024 09:13:30 +0100 Subject: [PATCH] Improve cacheability of Docker layers and add ca-certs to scratch image Signed-off-by: Marco Franssen --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 58964e40ce..4c5c491e08 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,12 +15,13 @@ COPY . . RUN make FROM scratch AS cilium-cli -COPY --from=builder /go/src/github.com/cilium/cilium-cli/cilium /usr/local/bin/cilium ENTRYPOINT ["cilium"] +COPY --from=builder --chown=root:root --chmod=755 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ +COPY --from=builder /go/src/github.com/cilium/cilium-cli/cilium /usr/local/bin/cilium FROM ubuntu:24.04@sha256:99c35190e22d294cdace2783ac55effc69d32896daaa265f0bbedbcde4fbe3e5 AS cilium-cli-ci -COPY --from=builder /go/src/github.com/cilium/cilium-cli/cilium /usr/local/bin/cilium ENTRYPOINT [] +COPY --from=builder /go/src/github.com/cilium/cilium-cli/cilium /usr/local/bin/cilium # Install cloud CLIs. Based on these instructions: # - https://cloud.google.com/sdk/docs/install#deb