FROM openshift/golang-builder:1.10 AS builder
ENV SOURCE_GIT_COMMIT=03fb6b14bd195ddc012e43dfd4e5c8964e00c2e5 SOURCE_DATE_EPOCH=1557159726 BUILD_VERSION=v4.1.9 SOURCE_GIT_URL=https://github.com/openshift/cluster-config-operator SOURCE_GIT_TAG=v0.0.0-alpha.0-99-g03fb6b14 BUILD_RELEASE=201907311355
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.9.20190731.135530
ENV SOURCE_GIT_COMMIT=03fb6b14bd195ddc012e43dfd4e5c8964e00c2e5 SOURCE_DATE_EPOCH=1557159726 BUILD_VERSION=v4.1.9 SOURCE_GIT_URL=https://github.com/openshift/cluster-config-operator SOURCE_GIT_TAG=v0.0.0-alpha.0-99-g03fb6b14 BUILD_RELEASE=201907311355
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 \
        com.redhat.component="ose-cluster-config-operator-container" \
        name="openshift/ose-cluster-config-operator" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-config-operator" \
        io.openshift.release.operator="true" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-config-operator/commit/03fb6b14bd195ddc012e43dfd4e5c8964e00c2e5" \
        version="v4.1.9" \
        io.openshift.build.commit.id="03fb6b14bd195ddc012e43dfd4e5c8964e00c2e5" \
        release="201907311355"

