FROM openshift/golang-builder:1.12 AS builder
ENV OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=13 OS_GIT_VERSION=4.3.13-202004131016-6c1da60 OS_GIT_TREE_STATE=clean SOURCE_GIT_COMMIT=6c1da609d2587ad67629485035fe7ba87b7eb936 SOURCE_GIT_TAG=v0.0.0-alpha.0-129-g6c1da609 SOURCE_GIT_URL=https://github.com/openshift/sdn SOURCE_DATE_EPOCH=1586208891 OS_GIT_COMMIT=6c1da60 BUILD_VERSION=v4.3.13 BUILD_RELEASE=202004131016
WORKDIR /go/src/github.com/openshift/sdn
COPY . .
RUN make build --warn-undefined-variables

FROM openshift/ose-base:v4.3.13.20200413.101616
ENV OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=13 OS_GIT_VERSION=4.3.13-202004131016-6c1da60 OS_GIT_TREE_STATE=clean SOURCE_GIT_COMMIT=6c1da609d2587ad67629485035fe7ba87b7eb936 SOURCE_GIT_TAG=v0.0.0-alpha.0-129-g6c1da609 SOURCE_GIT_URL=https://github.com/openshift/sdn SOURCE_DATE_EPOCH=1586208891 OS_GIT_COMMIT=6c1da60 BUILD_VERSION=v4.3.13 BUILD_RELEASE=202004131016
RUN INSTALL_PKGS="conntrack-tools" && \
    yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
    yum clean all && rm -rf /var/cache/*

COPY --from=builder /go/src/github.com/openshift/sdn/kube-proxy /usr/bin/
COPY ./images/iptables-scripts/iptables /usr/sbin/
COPY ./images/iptables-scripts/iptables-save /usr/sbin/
COPY ./images/iptables-scripts/iptables-restore /usr/sbin/
COPY ./images/iptables-scripts/ip6tables /usr/sbin/
COPY ./images/iptables-scripts/ip6tables-save /usr/sbin/
COPY ./images/iptables-scripts/ip6tables-restore /usr/sbin/

LABEL \
        io.k8s.display-name="Kubernetes kube-proxy" \
        io.k8s.description="Provides kube-proxy for external CNI plugins" \
        io.openshift.tags="openshift,kube-proxy" \
        name="openshift/ose-kube-proxy" \
        com.redhat.component="kube-proxy-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Networking" \
        io.openshift.maintainer.subcomponent="openshift-sdn" \
        version="v4.3.13" \
        release="202004131016" \
        io.openshift.build.commit.id="6c1da609d2587ad67629485035fe7ba87b7eb936" \
        io.openshift.build.source-location="https://github.com/openshift/sdn" \
        io.openshift.build.commit.url="https://github.com/openshift/sdn/commit/6c1da609d2587ad67629485035fe7ba87b7eb936"

