FROM openshift/golang-builder:1.10 AS builder
ENV SOURCE_GIT_COMMIT=ec4247dd36ab6713a26cfb53312aaf50d70f1059 SOURCE_DATE_EPOCH=1561512967 BUILD_VERSION=v4.1.22 SOURCE_GIT_URL=https://github.com/openshift/cluster-dns-operator SOURCE_GIT_TAG=ec4247d BUILD_RELEASE=201910291109
WORKDIR /go/src/github.com/openshift/cluster-dns-operator
COPY . .
RUN make build

FROM openshift/ose-base:v4.1.22.20191029.110950
ENV SOURCE_GIT_COMMIT=ec4247dd36ab6713a26cfb53312aaf50d70f1059 SOURCE_DATE_EPOCH=1561512967 BUILD_VERSION=v4.1.22 SOURCE_GIT_URL=https://github.com/openshift/cluster-dns-operator SOURCE_GIT_TAG=ec4247d BUILD_RELEASE=201910291109
COPY --from=builder /go/src/github.com/openshift/cluster-dns-operator/dns-operator /usr/bin/
COPY manifests /manifests
RUN useradd dns-operator
USER dns-operator
ENTRYPOINT ["/usr/bin/dns-operator"]

LABEL \
        io.k8s.description="This is a component of OpenShift and manages the lifecycle of cluster DNS services." \
        com.redhat.component="ose-cluster-dns-operator-container" \
        maintainer="Dan Mace <dmace@redhat.com>" \
        name="openshift/ose-cluster-dns-operator" \
        io.k8s.display-name="OpenShift dns-operator" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-dns-operator" \
        io.openshift.release.operator="true" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-dns-operator/commit/ec4247dd36ab6713a26cfb53312aaf50d70f1059" \
        version="v4.1.22" \
        io.openshift.build.commit.id="ec4247dd36ab6713a26cfb53312aaf50d70f1059" \
        release="201910291109"

