FROM openshift/golang-builder:rhel_8_golang_1.15 AS builder
ENV __doozer=update BUILD_RELEASE=202110051546.p0.git.42791ba.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-202110051546.p0.git.42791ba.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge KUBE_GIT_COMMIT=42791bac64066daac0922b3d77e4bd86edae3b4e KUBE_GIT_MAJOR=1 KUBE_GIT_MINOR=19+ KUBE_GIT_TREE_STATE=clean KUBE_GIT_VERSION=v1.19.0-rc.2+42791ba OS_GIT_COMMIT=42791ba OS_GIT_VERSION=4.7.0-202110051546.p0.git.42791ba.assembly.stream-42791ba SOURCE_DATE_EPOCH=1616617548 SOURCE_GIT_COMMIT=42791bac64066daac0922b3d77e4bd86edae3b4e SOURCE_GIT_TAG=42791bac SOURCE_GIT_URL=https://github.com/openshift/cluster-policy-controller 
WORKDIR /go/src/github.com/openshift/cluster-policy-controller
COPY . .
RUN make build --warn-undefined-variables

FROM openshift/ose-base:v4.7.0.20211005.155606
ENV __doozer=update BUILD_RELEASE=202110051546.p0.git.42791ba.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-202110051546.p0.git.42791ba.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge KUBE_GIT_COMMIT=42791bac64066daac0922b3d77e4bd86edae3b4e KUBE_GIT_MAJOR=1 KUBE_GIT_MINOR=19+ KUBE_GIT_TREE_STATE=clean KUBE_GIT_VERSION=v1.19.0-rc.2+42791ba OS_GIT_COMMIT=42791ba OS_GIT_VERSION=4.7.0-202110051546.p0.git.42791ba.assembly.stream-42791ba SOURCE_DATE_EPOCH=1616617548 SOURCE_GIT_COMMIT=42791bac64066daac0922b3d77e4bd86edae3b4e SOURCE_GIT_TAG=42791bac SOURCE_GIT_URL=https://github.com/openshift/cluster-policy-controller 
COPY --from=builder /go/src/github.com/openshift/cluster-policy-controller/cluster-policy-controller /usr/bin/

LABEL \
        io.k8s.display-name="OpenShift Cluster Policy Controller Command" \
        io.k8s.description="OpenShift is a platform for developing, building, and deploying containerized applications." \
        io.openshift.tags="openshift,cluster-policy-controller" \
        name="openshift/ose-cluster-policy-controller" \
        com.redhat.component="ose-cluster-policy-controller-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="kube-controller-manager" \
        release="202110051546.p0.git.42791ba.assembly.stream" \
        io.openshift.build.commit.id="42791bac64066daac0922b3d77e4bd86edae3b4e" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-policy-controller" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-policy-controller/commit/42791bac64066daac0922b3d77e4bd86edae3b4e" \
        version="v4.7.0"

