FROM openshift/golang-builder:1.13 AS builder
ENV __doozer=update BUILD_RELEASE=202101090338.p0 BUILD_VERSION=v4.5.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=5 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.5.0-202101090338.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=bd31263 OS_GIT_VERSION=4.5.0-202101090338.p0-bd31263 SOURCE_DATE_EPOCH=1601070289 SOURCE_GIT_COMMIT=bd312639caff6e1578c4777ccc7d10fb5a6707fd SOURCE_GIT_TAG=bd312639 SOURCE_GIT_URL=https://github.com/openshift/cluster-dns-operator 
WORKDIR /dns-operator
COPY . .
RUN make build

FROM openshift/ose-base:v4.5.0.20210109.040158
ENV __doozer=update BUILD_RELEASE=202101090338.p0 BUILD_VERSION=v4.5.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=5 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.5.0-202101090338.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=bd31263 OS_GIT_VERSION=4.5.0-202101090338.p0-bd31263 SOURCE_DATE_EPOCH=1601070289 SOURCE_GIT_COMMIT=bd312639caff6e1578c4777ccc7d10fb5a6707fd SOURCE_GIT_TAG=bd312639 SOURCE_GIT_URL=https://github.com/openshift/cluster-dns-operator 
COPY --from=builder /dns-operator/dns-operator /usr/bin/
COPY manifests /manifests
RUN useradd dns-operator
USER dns-operator
ENTRYPOINT ["/usr/bin/dns-operator"]

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

