From d3cdbd715f61fb193189b4fff666931e9aa662c2 Mon Sep 17 00:00:00 2001 From: Gavin Scallon Date: Fri, 12 Jun 2020 12:46:01 -0600 Subject: [PATCH] make install added and dockerfile cleanup --- Dockerfile | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3b9fafd..4465788 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,16 +4,12 @@ ARG BASE_REGISTRY=nexus-docker-secure.levelup-dev.io ARG BASE_IMAGE=redhat/ubi/ubi8 ARG BASE_TAG=8.2 ############################################################### -# FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} AS builder -FROM localhost/redhat/ubi/ubi8:8.2 AS builder +FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} AS builder + COPY v1.17.4.tar.gz scripts/iptables-wrapper ebtables-2.0.11.tar.gz / # Perform install of required packages for kube-proxy binary build # and build the binary -RUN dnf install -y make && \ - dnf install -y gcc && \ - dnf install -y go && \ - dnf install -y diffutils && \ - dnf install -y rsync && \ +RUN dnf install -y make gcc go diffutils rsync && \ dnf clean all && \ rm -rf /var/cache/dnf && \ tar xzf v1.17.4.tar.gz && \ @@ -23,8 +19,8 @@ RUN dnf install -y make && \ cd $GOPATH/src/k8s.io/kubernetes-1.17.4/ && \ make WHAT=cmd/kube-proxy -# FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} -FROM localhost/redhat/ubi/ubi8:8.2 +FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} + LABEL name="kube-proxy for Kubernetes" \ maintainer="gavin.scallon@parsons.com" \ vendor="Open Source" \ @@ -39,17 +35,16 @@ ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin # Install necessary container packages and etables RUN dnf update -y && \ dnf upgrade -y && \ - dnf install -y make && \ - dnf install -y gcc && \ - dnf install -y iptables && \ - dnf install -y ipset && \ + dnf install -y make gcc iptables ipset && \ tar xzf ebtables-2.0.11.tar.gz && \ rm -f ebtables-2.0.11.tar.gz && \ cd ebtables-2.0.11 && \ ./configure && \ make && \ + make install && \ cd .. && \ mv iptables-wrapper /usr/sbin/iptables-wrapper && \ + dnf remove -y make gcc unbound-libs python3-unbound && \ dnf clean all && \ rm -rf /var/cache/dnf @@ -64,8 +59,4 @@ RUN update-alternatives \ --slave /usr/sbin/ip6tables-restore ip6tables-restore /usr/sbin/iptables-wrapper \ --slave /usr/sbin/ip6tables-save ip6tables-save /usr/sbin/iptables-wrapper - -# kernel mitigations -RUN dnf install -y bzip2 - CMD ["/bin/sh"] \ No newline at end of file -- GitLab