@@ -1,5 +1,5 @@
-#export OVN_BRANCH=master
-#export OVN_VERSION=2.12
+#export OVN_BRANCH=main
+#export OVN_VERSION=24.03.90
#export DISTRO=debian
#export GITHUB_SRC=https://github.com/ovn-org/ovn.git
#export DOCKER_REPO=ovn-org/ovn
@@ -1,4 +1,4 @@
-FROM ubuntu:16.04
+FROM ubuntu:22.04
MAINTAINER "Aliasgar Ginwala" <aginwala@ebay.com>
ARG OVN_BRANCH
@@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+set -e
+
OVN_BRANCH=$1
GITHUB_SRC=$2
@@ -12,29 +12,26 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+set -e
+
OVN_BRANCH=$1
GITHUB_SRC=$2
-# get ovs source always from master as its needed as dependency
-mkdir /build; cd /build
-git clone --depth 1 -b master https://github.com/openvswitch/ovs.git
-cd ovs;
-mkdir _gcc;
+# Get ovn source.
+git clone --depth 1 -b $OVN_BRANCH $GITHUB_SRC
+cd ovn
-# build and install
+# Get OVS submodule, build and install OVS.
+git submodule update --init
+cd ovs
./boot.sh
-cd _gcc
-../configure --localstatedir="/var" --sysconfdir="/etc" --prefix="/usr" \
+./configure --localstatedir="/var" --sysconfdir="/etc" --prefix="/usr" \
--enable-ssl
-cd ..; make -C _gcc install; cd ..
-
+make -j8 install
+cd ..
-# get ovn source
-git clone --depth 1 -b $OVN_BRANCH $GITHUB_SRC
-cd ovn
-
-# build and install
+# Build and install OVN.
./boot.sh
./configure --localstatedir="/var" --sysconfdir="/etc" --prefix="/usr" \
---enable-ssl --with-ovs-source=/build/ovs/ --with-ovs-build=/build/ovs/_gcc
-make -j8; make install
+--enable-ssl
+make -j8 install
Most of the steps were inaccurate. Instead, use latest Ubuntu, use OVS from the submodule inside the OVN repo. Signed-off-by: Dumitru Ceara <dceara@redhat.com> --- utilities/docker/Makefile | 4 ++-- utilities/docker/debian/Dockerfile | 2 +- utilities/docker/debian/build.sh | 2 ++ utilities/docker/install_ovn.sh | 31 ++++++++++++++---------------- 4 files changed, 19 insertions(+), 20 deletions(-)