FROM openshift/golang-builder:1.10 AS builder
ENV OS_GIT_MAJOR=4 OS_GIT_MINOR=1 OS_GIT_PATCH=41 OS_GIT_VERSION=4.1.41-202004130646-7561e70 OS_GIT_TREE_STATE=clean SOURCE_GIT_COMMIT=7561e708b52c13004aaeb383c501c1bafc433dc7 SOURCE_GIT_TAG=v0.0.0-alpha.0-104-g7561e708 SOURCE_GIT_URL=https://github.com/openshift/cluster-config-operator SOURCE_DATE_EPOCH=1565656147 OS_GIT_COMMIT=7561e70 BUILD_VERSION=v4.1.41 BUILD_RELEASE=202004130646
WORKDIR /go/src/github.com/openshift/cluster-config-operator
COPY . .
ENV GO_PACKAGE github.com/openshift/cluster-config-operator
RUN go build -ldflags "-X $GO_PACKAGE/pkg/version.versionFromGit=$(git describe --long --tags --abbrev=7 --match 'v[0-9]*')" ./cmd/cluster-config-operator

FROM openshift/ose-base:v4.1.41.20200413.064634
ENV OS_GIT_MAJOR=4 OS_GIT_MINOR=1 OS_GIT_PATCH=41 OS_GIT_VERSION=4.1.41-202004130646-7561e70 OS_GIT_TREE_STATE=clean SOURCE_GIT_COMMIT=7561e708b52c13004aaeb383c501c1bafc433dc7 SOURCE_GIT_TAG=v0.0.0-alpha.0-104-g7561e708 SOURCE_GIT_URL=https://github.com/openshift/cluster-config-operator SOURCE_DATE_EPOCH=1565656147 OS_GIT_COMMIT=7561e70 BUILD_VERSION=v4.1.41 BUILD_RELEASE=202004130646
RUN mkdir -p /usr/share/bootkube/manifests/manifests
RUN mkdir -p /usr/share/bootkube/manifests/bootstrap-manifests
COPY --from=builder /go/src/github.com/openshift/cluster-config-operator/manifests/* /usr/share/bootkube/manifests/manifests/
COPY --from=builder /go/src/github.com/openshift/cluster-config-operator/cluster-config-operator /usr/bin/
COPY manifests /manifests
COPY empty-resources /manifests

LABEL \
        io.openshift.release.operator="true" \
        name="openshift/ose-cluster-config-operator" \
        com.redhat.component="ose-cluster-config-operator-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        version="v4.1.41" \
        release="202004130646" \
        io.openshift.build.commit.id="7561e708b52c13004aaeb383c501c1bafc433dc7" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-config-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-config-operator/commit/7561e708b52c13004aaeb383c501c1bafc433dc7"

