FROM openshift/golang-builder:rhel_8_golang_1.15 AS builder
ENV __doozer=update BUILD_RELEASE=202104250659.p0 BUILD_VERSION=v4.7.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=7 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.7.0-202104250659.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=1acc3dd OS_GIT_VERSION=4.7.0-202104250659.p0-1acc3dd SOURCE_DATE_EPOCH=1615914541 SOURCE_GIT_COMMIT=1acc3dd5cf5c0191a5db308b8c8acd9b4b9a7b3a SOURCE_GIT_TAG=atomic-openshift-node-problem-detector-3.11.233-1.p0-12-g1acc3dd SOURCE_GIT_URL=https://github.com/openshift/node-problem-detector 
WORKDIR /go/src/k8s.io/node-problem-detector
COPY . .
RUN yum install -y systemd-devel && \
    make build-binaries

FROM openshift/base-rhel8:v4.7.0.20210425.073610
ENV __doozer=update BUILD_RELEASE=202104250659.p0 BUILD_VERSION=v4.7.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=7 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.7.0-202104250659.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=1acc3dd OS_GIT_VERSION=4.7.0-202104250659.p0-1acc3dd SOURCE_DATE_EPOCH=1615914541 SOURCE_GIT_COMMIT=1acc3dd5cf5c0191a5db308b8c8acd9b4b9a7b3a SOURCE_GIT_TAG=atomic-openshift-node-problem-detector-3.11.233-1.p0-12-g1acc3dd SOURCE_GIT_URL=https://github.com/openshift/node-problem-detector 
COPY --from=builder /go/src/k8s.io/node-problem-detector/bin/node-problem-detector /usr/bin/
COPY --from=builder /go/src/k8s.io/node-problem-detector/bin/log-counter /usr/bin/

LABEL \
        License="GPLv2+" \
        io.k8s.description="node-problem-detector aims to make various node problems visible to the upstream layers in cluster management stack. It is a daemon which runs on each node, detects node problems and reports them to apiserver." \
        io.k8s.display-name="Node Problem Detector" \
        io.openshift.tags="openshift,node" \
        vendor="Red Hat" \
        name="openshift/ose-node-problem-detector" \
        com.redhat.component="atomic-openshift-node-problem-detector-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Node" \
        release="202104250659.p0" \
        io.openshift.build.commit.id="1acc3dd5cf5c0191a5db308b8c8acd9b4b9a7b3a" \
        io.openshift.build.source-location="https://github.com/openshift/node-problem-detector" \
        io.openshift.build.commit.url="https://github.com/openshift/node-problem-detector/commit/1acc3dd5cf5c0191a5db308b8c8acd9b4b9a7b3a" \
        version="v4.7.0"

