FROM openshift/golang-builder:1.12 AS builder
ENV SOURCE_GIT_COMMIT=45d6a23e08a93001bebb45887466248b0c8b7b88 SOURCE_DATE_EPOCH=1575673349 BUILD_VERSION=v4.2.13 SOURCE_GIT_URL=https://github.com/openshift/cluster-kube-controller-manager-operator SOURCE_GIT_TAG=45d6a23e BUILD_RELEASE=201912230557
WORKDIR /go/src/github.com/openshift/cluster-kube-controller-manager-operator
COPY . .
RUN make build --warn-undefined-variables

FROM openshift/ose-base:v4.2.13.20191223.055734
ENV SOURCE_GIT_COMMIT=45d6a23e08a93001bebb45887466248b0c8b7b88 SOURCE_DATE_EPOCH=1575673349 BUILD_VERSION=v4.2.13 SOURCE_GIT_URL=https://github.com/openshift/cluster-kube-controller-manager-operator SOURCE_GIT_TAG=45d6a23e BUILD_RELEASE=201912230557
RUN mkdir -p /usr/share/bootkube/manifests
COPY --from=builder /go/src/github.com/openshift/cluster-kube-controller-manager-operator/bindata/bootkube/* /usr/share/bootkube/manifests/
COPY --from=builder /go/src/github.com/openshift/cluster-kube-controller-manager-operator/cluster-kube-controller-manager-operator /usr/bin/
COPY manifests /manifests

LABEL \
        com.redhat.component="ose-cluster-kube-controller-manager-operator-container" \
        name="openshift/ose-cluster-kube-controller-manager-operator" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-kube-controller-manager-operator" \
        io.openshift.release.operator="true" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-kube-controller-manager-operator/commit/45d6a23e08a93001bebb45887466248b0c8b7b88" \
        version="v4.2.13" \
        io.openshift.build.commit.id="45d6a23e08a93001bebb45887466248b0c8b7b88" \
        release="201912230557"

