FROM openshift/golang-builder:rhel_8_golang_1.15 AS builder
ENV __doozer=update BUILD_RELEASE=202107261701.p0.git.11dd29b.assembly.stream BUILD_VERSION=v4.7.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=7 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.7.0-202107261701.p0.git.11dd29b.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=11dd29b OS_GIT_VERSION=4.7.0-202107261701.p0.git.11dd29b.assembly.stream-11dd29b SOURCE_DATE_EPOCH=1627020549 SOURCE_GIT_COMMIT=11dd29b9de0cd9ff52e18ff0581d5d93d06b6d2b SOURCE_GIT_TAG=11dd29b9 SOURCE_GIT_URL=https://github.com/openshift/cluster-network-operator 
WORKDIR /go/src/github.com/openshift/cluster-network-operator
COPY . .
RUN hack/build-go.sh

FROM openshift/ose-base:v4.7.0.20210726.171025
ENV __doozer=update BUILD_RELEASE=202107261701.p0.git.11dd29b.assembly.stream BUILD_VERSION=v4.7.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=7 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.7.0-202107261701.p0.git.11dd29b.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=11dd29b OS_GIT_VERSION=4.7.0-202107261701.p0.git.11dd29b.assembly.stream-11dd29b SOURCE_DATE_EPOCH=1627020549 SOURCE_GIT_COMMIT=11dd29b9de0cd9ff52e18ff0581d5d93d06b6d2b SOURCE_GIT_TAG=11dd29b9 SOURCE_GIT_URL=https://github.com/openshift/cluster-network-operator 
COPY --from=builder  /go/src/github.com/openshift/cluster-network-operator/cluster-network-operator /usr/bin/
COPY --from=builder  /go/src/github.com/openshift/cluster-network-operator/cluster-network-check-endpoints /usr/bin/
COPY manifests /manifests
COPY bindata /bindata
ENV OPERATOR_NAME=cluster-network-operator
CMD ["/usr/bin/cluster-network-operator"]

LABEL \
        io.openshift.release.operator="true" \
        name="openshift/ose-cluster-network-operator" \
        com.redhat.component="cluster-network-operator-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Networking" \
        io.openshift.maintainer.subcomponent="openshift-sdn" \
        release="202107261701.p0.git.11dd29b.assembly.stream" \
        io.openshift.build.commit.id="11dd29b9de0cd9ff52e18ff0581d5d93d06b6d2b" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-network-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-network-operator/commit/11dd29b9de0cd9ff52e18ff0581d5d93d06b6d2b" \
        version="v4.7.0"

