FROM openshift/golang-builder:1.10 AS builder
ENV SOURCE_GIT_COMMIT=fbcb8252a1bab3d32ecf2dd3307f798aacd0280e SOURCE_DATE_EPOCH=1549699766 BUILD_VERSION=v4.1.20 SOURCE_GIT_URL=https://github.com/openshift/coredns SOURCE_GIT_TAG=v3.11.0-57-gfbcb8252 BUILD_RELEASE=201910102034
WORKDIR /go/src/github.com/coredns/coredns
COPY . .
RUN go build -o coredns .

FROM openshift/ose-base:v4.1.20.20191010.203415
ENV SOURCE_GIT_COMMIT=fbcb8252a1bab3d32ecf2dd3307f798aacd0280e SOURCE_DATE_EPOCH=1549699766 BUILD_VERSION=v4.1.20 SOURCE_GIT_URL=https://github.com/openshift/coredns SOURCE_GIT_TAG=v3.11.0-57-gfbcb8252 BUILD_RELEASE=201910102034
COPY --from=builder /go/src/github.com/coredns/coredns/coredns /usr/bin/

ENTRYPOINT ["/usr/bin/coredns"]

LABEL \
        io.k8s.description="CoreDNS delivers the DNS and Discovery Service for a Kubernetes cluster." \
        com.redhat.component="coredns-container" \
        maintainer="dev@lists.openshift.redhat.com" \
        name="openshift/ose-coredns" \
        io.k8s.display-name="CoreDNS" \
        io.openshift.build.source-location="https://github.com/openshift/coredns" \
        io.openshift.build.commit.url="https://github.com/openshift/coredns/commit/fbcb8252a1bab3d32ecf2dd3307f798aacd0280e" \
        version="v4.1.20" \
        io.openshift.build.commit.id="fbcb8252a1bab3d32ecf2dd3307f798aacd0280e" \
        release="201910102034"

