FROM openshift/golang-builder:1.12 AS builder
ENV SOURCE_GIT_COMMIT=39dbbca170d2b1baa5919fa8c5b9158b9ad7dd39 SOURCE_GIT_TAG=39dbbca1 SOURCE_GIT_URL=https://github.com/openshift/insights-operator SOURCE_DATE_EPOCH=1581505431 BUILD_VERSION=v4.2.21 BUILD_RELEASE=202002240343
WORKDIR /go/src/github.com/openshift/insights-operator
COPY . .
RUN make build

FROM openshift/ose-base:v4.2.21.20200224.034357
ENV SOURCE_GIT_COMMIT=39dbbca170d2b1baa5919fa8c5b9158b9ad7dd39 SOURCE_GIT_TAG=39dbbca1 SOURCE_GIT_URL=https://github.com/openshift/insights-operator SOURCE_DATE_EPOCH=1581505431 BUILD_VERSION=v4.2.21 BUILD_RELEASE=202002240343
COPY --from=builder /go/src/github.com/openshift/insights-operator/bin/insights-operator /usr/bin/
COPY config/pod.yaml /etc/insights-operator/server.yaml
COPY manifests /manifests
ENTRYPOINT ["/usr/bin/insights-operator"]

LABEL \
        io.openshift.release.operator="true" \
        name="openshift/ose-insights-operator" \
        com.redhat.component="ose-insights-operator-container" \
        version="v4.2.21" \
        release="202002240343" \
        io.openshift.build.commit.id="39dbbca170d2b1baa5919fa8c5b9158b9ad7dd39" \
        io.openshift.build.source-location="https://github.com/openshift/insights-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/insights-operator/commit/39dbbca170d2b1baa5919fa8c5b9158b9ad7dd39"

