From 767483638166392a90d5c0fe0d17116a9df72770 Mon Sep 17 00:00:00 2001 From: Yash Singh <99066083+yashsingh74@users.noreply.github.com> Date: Fri, 26 May 2023 15:57:25 +0200 Subject: [PATCH] Introduces the ARG in Dockerfile (#5931) * build(deps): bump google.golang.org/api from 0.109.0 to 0.110.0 (#5928) Signed-off-by: Yash Singh * Updated Dockefile Signed-off-by: Yash Singh * Rebase the PR Signed-off-by: Yash Singh --------- Signed-off-by: Yash Singh Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3c2b7f43b..f75519b4b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM --platform=$BUILDPLATFORM debian:stable-slim AS build +ARG DEBIAN_IMAGE=debian:stable-slim +ARG BASE=gcr.io/distroless/static-debian11:nonroot +FROM --platform=$BUILDPLATFORM ${DEBIAN_IMAGE} AS build SHELL [ "/bin/sh", "-ec" ] RUN export DEBCONF_NONINTERACTIVE_SEEN=true \ @@ -12,7 +14,7 @@ RUN export DEBCONF_NONINTERACTIVE_SEEN=true \ COPY coredns /coredns RUN setcap cap_net_bind_service=+ep /coredns -FROM --platform=$TARGETPLATFORM gcr.io/distroless/static-debian11:nonroot +FROM --platform=$TARGETPLATFORM ${BASE} COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY --from=build /coredns /coredns USER nonroot:nonroot