FROM openshift/golang-builder@sha256:ab1bfcb9d06b339cb767acb804e6aa82eb23cd0795e6f82af54e92c312a32777 AS builder
ENV __doozer=update BUILD_RELEASE=202202151117.p0.gb45ac97.assembly.stream BUILD_VERSION=v4.6.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=6 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.6.0-202202151117.p0.gb45ac97.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=b45ac97 OS_GIT_VERSION=4.6.0-202202151117.p0.gb45ac97.assembly.stream-b45ac97 SOURCE_DATE_EPOCH=1623360705 SOURCE_GIT_COMMIT=b45ac97a50a7d2666e3acd6241ad8b1e4e57a19f SOURCE_GIT_TAG=b45ac97a SOURCE_GIT_URL=https://github.com/openshift/cluster-dns-operator 
WORKDIR /dns-operator
COPY . .
RUN make build

FROM openshift/ose-base:v4.6.0.20220215.113753
ENV __doozer=update BUILD_RELEASE=202202151117.p0.gb45ac97.assembly.stream BUILD_VERSION=v4.6.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=6 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.6.0-202202151117.p0.gb45ac97.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=b45ac97 OS_GIT_VERSION=4.6.0-202202151117.p0.gb45ac97.assembly.stream-b45ac97 SOURCE_DATE_EPOCH=1623360705 SOURCE_GIT_COMMIT=b45ac97a50a7d2666e3acd6241ad8b1e4e57a19f SOURCE_GIT_TAG=b45ac97a 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="202202151117.p0.gb45ac97.assembly.stream" \
        io.openshift.build.commit.id="b45ac97a50a7d2666e3acd6241ad8b1e4e57a19f" \
        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/b45ac97a50a7d2666e3acd6241ad8b1e4e57a19f" \
        version="v4.6.0"

