FROM openshift/golang-builder:1.11 AS builder
ENV SOURCE_GIT_COMMIT=8b942ac6bf3efdb9b62ae8b03847b6a71d769ede SOURCE_DATE_EPOCH=1574333020 BUILD_VERSION=v4.2.11 SOURCE_GIT_URL=https://github.com/openshift/cluster-node-tuning-operator SOURCE_GIT_TAG=8b942ac BUILD_RELEASE=201912100122
WORKDIR /go/src/github.com/openshift/cluster-node-tuning-operator
COPY . .
RUN make build

FROM openshift/ose-base:v4.2.11.20191210.012231
ENV SOURCE_GIT_COMMIT=8b942ac6bf3efdb9b62ae8b03847b6a71d769ede SOURCE_DATE_EPOCH=1574333020 BUILD_VERSION=v4.2.11 SOURCE_GIT_URL=https://github.com/openshift/cluster-node-tuning-operator SOURCE_GIT_TAG=8b942ac BUILD_RELEASE=201912100122
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/8b942ac6bf3efdb9b62ae8b03847b6a71d769ede" \
        version="v4.2.11" \
        io.openshift.build.commit.id="8b942ac6bf3efdb9b62ae8b03847b6a71d769ede" \
        release="201912100122"

