From a5388133de67e2337f02a1d3735df12360a79285 Mon Sep 17 00:00:00 2001 From: Brennan Kinney <5098581+polarathene@users.noreply.github.com> Date: Tue, 5 Aug 2025 11:54:18 +1200 Subject: [PATCH] chore: Minor changes to `Dockerfile` (#7428) - `-qq` implies `-y` for `apt-get`. Also there never was `-yy`, only `-y`. - `--no-install-recommends` added at the request of review feedback. - Add a reference comment for better context of why `WORKDIR` is explicitly set to the default, as this was a fix for an implicit change when the base image was adjusted (_originally a breaking change for users of the image at the time_). Signed-off-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com> --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 09ebd672e..5202e8b7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,8 +8,8 @@ RUN export DEBCONF_NONINTERACTIVE_SEEN=true \ DEBIAN_PRIORITY=critical \ TERM=linux ; \ apt-get -qq update ; \ - apt-get -yyqq upgrade ; \ - apt-get -yyqq install ca-certificates libcap2-bin; \ + apt-get -qq upgrade ; \ + apt-get -qq --no-install-recommends install ca-certificates libcap2-bin; \ apt-get clean COPY coredns /coredns RUN setcap cap_net_bind_service=+ep /coredns @@ -18,6 +18,8 @@ FROM --platform=$TARGETPLATFORM ${BASE} COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY --from=build /coredns /coredns USER nonroot:nonroot +# Reset the working directory inherited from the base image back to the expected default: +# https://github.com/coredns/coredns/issues/7009#issuecomment-3124851608 WORKDIR / EXPOSE 53 53/udp ENTRYPOINT ["/coredns"]