FROM dockerhub.artifactory.eng.vmware.com/library/debian:stable-slim@sha256:fb24d5c869a1c878ed22840096d50f7d5459370f64a21191042e2b138244e8ae
RUN echo "deb http://build-artifactory.eng.vmware.com/debian-remote stable main" > /etc/apt/sources.list
RUN echo "deb http://build-artifactory.eng.vmware.com/debian-remote stable-updates main" >> /etc/apt/sources.list

RUN apt-get update && apt-get -uy upgrade
RUN apt-get -y install ca-certificates=20190110 && update-ca-certificates

FROM scratch

COPY --from=0 /etc/ssl/certs /etc/ssl/certs
ADD coredns /coredns

EXPOSE 53 53/udp
ENTRYPOINT ["/coredns"]
