FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.15-openshift-4.7 AS builder
WORKDIR /go/src/k8s.io/node-problem-detector
COPY . .
RUN yum install -y systemd-devel && \
    make build-binaries

FROM registry.ci.openshift.org/ocp/builder:rhel-8-base-openshift-4.7
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/
