Dockerfile: copy only CA certificate bundle
and never more - (dangling) symlinks pointing to /usr/share/ca-certificates/mozilla/ in Debian:stable-slim
FROM debian:stable-slim
+SHELL [ "/bin/sh", "-ec" ]
-RUN apt-get update && apt-get -uy upgrade
-RUN apt-get -y install ca-certificates && update-ca-certificates
+RUN export DEBCONF_NONINTERACTIVE_SEEN=true \
+ DEBIAN_FRONTEND=noninteractive \
+ DEBIAN_PRIORITY=critical \
+ TERM=linux ; \
+ apt-get -qq update ; \
+ apt-get -yyqq upgrade ; \
+ apt-get -yyqq install ca-certificates ; \
+ apt-get clean
FROM scratch
-COPY --from=0 /etc/ssl/certs /etc/ssl/certs
+COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
ADD coredns /coredns
EXPOSE 53 53/udp
