FROM openshift/golang-builder:1.11 AS builder
ENV SOURCE_GIT_COMMIT=ee308040a94323ea7cac103d41812ef1d2fdcd89 SOURCE_DATE_EPOCH=1566397074 BUILD_VERSION=v4.2.1 SOURCE_GIT_URL=https://github.com/openshift/cluster-node-tuning-operator SOURCE_GIT_TAG=ee30804 BUILD_RELEASE=201910221723
WORKDIR /go/src/github.com/openshift/cluster-node-tuning-operator
COPY . .
RUN make build

FROM openshift/ose-base:v4.2.1.20191022.172340
ENV SOURCE_GIT_COMMIT=ee308040a94323ea7cac103d41812ef1d2fdcd89 SOURCE_DATE_EPOCH=1566397074 BUILD_VERSION=v4.2.1 SOURCE_GIT_URL=https://github.com/openshift/cluster-node-tuning-operator SOURCE_GIT_TAG=ee30804 BUILD_RELEASE=201910221723
COPY --from=builder /go/src/github.com/openshift/cluster-node-tuning-operator/cluster-node-tuning-operator /usr/bin/
COPY manifests /manifests
RUN useradd cluster-node-tuning-operator
USER cluster-node-tuning-operator
ENTRYPOINT ["/usr/bin/cluster-node-tuning-operator"]

LABEL \
        io.k8s.description="This is a component of OpenShift and manages the lifecycle of node-level tuning." \
        com.redhat.component="cluster-node-tuning-operator-container" \
        name="openshift/ose-cluster-node-tuning-operator" \
        io.k8s.display-name="OpenShift cluster-node-tuning-operator" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-node-tuning-operator" \
        io.openshift.release.operator="true" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-node-tuning-operator/commit/ee308040a94323ea7cac103d41812ef1d2fdcd89" \
        version="v4.2.1" \
        io.openshift.build.commit.id="ee308040a94323ea7cac103d41812ef1d2fdcd89" \
        release="201910221723"

