FROM openshift/golang-builder:1.11 AS builder
ENV SOURCE_GIT_COMMIT=35fb4b4c4d08f378ef74664a6e8d0f219c582158 SOURCE_GIT_TAG=35fb4b4 SOURCE_GIT_URL=https://github.com/openshift/sriov-cni SOURCE_DATE_EPOCH=1565238107 BUILD_VERSION=v4.2.18 BUILD_RELEASE=202002031246

ADD . /usr/src/sriov-cni

WORKDIR /usr/src/sriov-cni
RUN make clean && \
    make build

FROM openshift/ose-base:v4.2.18.20200203.124646
ENV SOURCE_GIT_COMMIT=35fb4b4c4d08f378ef74664a6e8d0f219c582158 SOURCE_GIT_TAG=35fb4b4 SOURCE_GIT_URL=https://github.com/openshift/sriov-cni SOURCE_DATE_EPOCH=1565238107 BUILD_VERSION=v4.2.18 BUILD_RELEASE=202002031246
COPY --from=builder /usr/src/sriov-cni/build/sriov /usr/bin/
WORKDIR /


ADD ./images/entrypoint.sh /

ENTRYPOINT ["/entrypoint.sh"]

LABEL \
        io.k8s.display-name="SR-IOV CNI" \
        name="openshift/ose-sriov-cni" \
        com.redhat.component="sriov-cni-container" \
        version="v4.2.18" \
        release="202002031246" \
        io.openshift.build.commit.id="35fb4b4c4d08f378ef74664a6e8d0f219c582158" \
        io.openshift.build.source-location="https://github.com/openshift/sriov-cni" \
        io.openshift.build.commit.url="https://github.com/openshift/sriov-cni/commit/35fb4b4c4d08f378ef74664a6e8d0f219c582158"

