FROM openshift/golang-builder:1.12 AS builder
ENV SOURCE_GIT_COMMIT=cd3dadebefad4a7ac8ba10382497715749f7fad7 SOURCE_GIT_TAG=cd3dadeb SOURCE_GIT_URL=https://github.com/openshift/cluster-kube-apiserver-operator SOURCE_DATE_EPOCH=1580860833 BUILD_VERSION=v4.3.2 BUILD_RELEASE=202002112006
WORKDIR /go/src/github.com/openshift/cluster-kube-apiserver-operator
COPY . .
ENV GO_PACKAGE github.com/openshift/cluster-kube-apiserver-operator
RUN make build --warn-undefined-variables

FROM openshift/ose-base:v4.3.2.20200211.200621
ENV SOURCE_GIT_COMMIT=cd3dadebefad4a7ac8ba10382497715749f7fad7 SOURCE_GIT_TAG=cd3dadeb SOURCE_GIT_URL=https://github.com/openshift/cluster-kube-apiserver-operator SOURCE_DATE_EPOCH=1580860833 BUILD_VERSION=v4.3.2 BUILD_RELEASE=202002112006
RUN mkdir -p /usr/share/bootkube/manifests /manifests
COPY --from=builder /go/src/github.com/openshift/cluster-kube-apiserver-operator/bindata/bootkube/* /usr/share/bootkube/manifests/
COPY --from=builder /go/src/github.com/openshift/cluster-kube-apiserver-operator/cluster-kube-apiserver-operator /usr/bin/
COPY manifests/*.yaml /manifests/
COPY manifests/image-references /manifests/
COPY vendor/github.com/openshift/api/operator/v1/0000_20_kube-apiserver-operator_01_config.crd.yaml /manifests
# FIXME: entrypoint shouldn't be bash but the binary (needs fixing the chain)
# ENTRYPOINT ["/usr/bin/cluster-kube-apiserver-operator"]

LABEL \
        io.openshift.release.operator="true" \
        name="openshift/ose-cluster-kube-apiserver-operator" \
        com.redhat.component="ose-cluster-kube-apiserver-operator-container" \
        version="v4.3.2" \
        release="202002112006" \
        io.openshift.build.commit.id="cd3dadebefad4a7ac8ba10382497715749f7fad7" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-kube-apiserver-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-kube-apiserver-operator/commit/cd3dadebefad4a7ac8ba10382497715749f7fad7"

