From 5c0b0d9044767cd0a1e4a40b40be911b768bd867 Mon Sep 17 00:00:00 2001 From: mid_one Date: Fri, 31 May 2019 05:23:59 +0800 Subject: [PATCH] Create OVS docker image with version 2.11.0 The version of existing OVS docker image is too old. StarlingX needs to build its own OVS docker image with latest version 2.11.0 which is the same as the version of OVS running on hosts. Change-Id: I819678b3309d7571b51e275718b17d87415cf894 Story: #2004649 Task: #30281 Co-Authored-By: Cheng Li Signed-off-by: Chenjie Xu --- centos_stable_docker_images.inc | 1 + .../openvswitch/centos/docker/Dockerfile | 56 +++++++++++++++++++ .../centos/stx-ovs.stable_docker_image | 2 + 3 files changed, 59 insertions(+) create mode 100644 networking/openvswitch/centos/docker/Dockerfile create mode 100644 networking/openvswitch/centos/stx-ovs.stable_docker_image diff --git a/centos_stable_docker_images.inc b/centos_stable_docker_images.inc index fb46fecd3..418b2f107 100644 --- a/centos_stable_docker_images.inc +++ b/centos_stable_docker_images.inc @@ -2,3 +2,4 @@ virt/libvirt database/mariadb kubernetes/cni/sriov-cni kubernetes/plugins/sriov-network-device-plugin +networking/openvswitch diff --git a/networking/openvswitch/centos/docker/Dockerfile b/networking/openvswitch/centos/docker/Dockerfile new file mode 100644 index 000000000..c19a2152e --- /dev/null +++ b/networking/openvswitch/centos/docker/Dockerfile @@ -0,0 +1,56 @@ +# Expected build arguments: +# BASE: specify base layer +# +ARG BASE + +FROM ${BASE} + +ENV OVS_VERSION=2.11.0 + +RUN set -ex ;\ + yum install -y \ + bash \ + gcc \ + python2-sphinx \ + autoconf \ + automake \ + libtool \ + systemd-units \ + openssl \ + openssl-devel \ + python2-devel \ + python2-six \ + desktop-file-utils \ + groff-base \ + graphviz \ + procps-ng \ + python2-pyOpenSSL \ + nmap-ncat \ + libcap-ng \ + libcap-ng-devel \ + curl ;\ + yum clean all ;\ + TMP_DIR=$(mktemp -d) ;\ + curl -sSL http://openvswitch.org/releases/openvswitch-${OVS_VERSION}.tar.gz | tar xz -C ${TMP_DIR} --strip-components=1 ;\ + cd ${TMP_DIR} ;\ + ./boot.sh ;\ + ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc ;\ + make ;\ + make install ;\ + cd / ;\ + rm -rf ${TMP_DIR} ;\ + yum autoremove -y \ + openssl-devel \ + python2-devel \ + libcap-ng-devel \ + gcc \ + python2-sphinx \ + autoconf \ + automake \ + libtool \ + python2-six \ + desktop-file-utils \ + groff-base \ + graphviz \ + python2-pyOpenSSL \ + nmap-ncat ;\ diff --git a/networking/openvswitch/centos/stx-ovs.stable_docker_image b/networking/openvswitch/centos/stx-ovs.stable_docker_image new file mode 100644 index 000000000..c5892097f --- /dev/null +++ b/networking/openvswitch/centos/stx-ovs.stable_docker_image @@ -0,0 +1,2 @@ +BUILDER=docker +LABEL=stx-ovs