FROM openshift/golang-builder:rhel_8_golang_1.16 AS builder
ENV __doozer=update BUILD_RELEASE=202108130208.p0.git.8e44437.assembly.stream BUILD_VERSION=v4.8.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=8 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.8.0-202108130208.p0.git.8e44437.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge KUBE_GIT_COMMIT=8e44437295e82d22756b8122bdc1849585614c13 KUBE_GIT_MAJOR=1 KUBE_GIT_MINOR=13+ KUBE_GIT_TREE_STATE=clean KUBE_GIT_VERSION=v1.13.0+8e44437 OS_GIT_COMMIT=8e44437 OS_GIT_VERSION=4.8.0-202108130208.p0.git.8e44437.assembly.stream-8e44437 SOURCE_DATE_EPOCH=1619101770 SOURCE_GIT_COMMIT=8e44437295e82d22756b8122bdc1849585614c13 SOURCE_GIT_TAG=atomic-openshift-node-problem-detector-3.11.233-1.p0-365-g8e44437 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.8.0.20210813.021751
ENV __doozer=update BUILD_RELEASE=202108130208.p0.git.8e44437.assembly.stream BUILD_VERSION=v4.8.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=8 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.8.0-202108130208.p0.git.8e44437.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge KUBE_GIT_COMMIT=8e44437295e82d22756b8122bdc1849585614c13 KUBE_GIT_MAJOR=1 KUBE_GIT_MINOR=13+ KUBE_GIT_TREE_STATE=clean KUBE_GIT_VERSION=v1.13.0+8e44437 OS_GIT_COMMIT=8e44437 OS_GIT_VERSION=4.8.0-202108130208.p0.git.8e44437.assembly.stream-8e44437 SOURCE_DATE_EPOCH=1619101770 SOURCE_GIT_COMMIT=8e44437295e82d22756b8122bdc1849585614c13 SOURCE_GIT_TAG=atomic-openshift-node-problem-detector-3.11.233-1.p0-365-g8e44437 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="202108130208.p0.git.8e44437.assembly.stream" \
        io.openshift.build.commit.id="8e44437295e82d22756b8122bdc1849585614c13" \
        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/8e44437295e82d22756b8122bdc1849585614c13" \
        version="v4.8.0"

