From 76f342e42b5c7f1871c89cad96c67361852883e5 Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Mon, 20 Nov 2023 09:35:08 -0800 Subject: [PATCH] install: fixed ubuntu/rocky to use /opt workdir, added functioning rocky 8 ospf rpm build --- dockerfiles/Dockerfile.ospf-mdr | 35 +++++++++++++++++++++++++++++++-- dockerfiles/Dockerfile.rocky | 2 +- dockerfiles/Dockerfile.ubuntu | 2 +- 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/dockerfiles/Dockerfile.ospf-mdr b/dockerfiles/Dockerfile.ospf-mdr index 948689e9..265a561b 100644 --- a/dockerfiles/Dockerfile.ospf-mdr +++ b/dockerfiles/Dockerfile.ospf-mdr @@ -1,5 +1,36 @@ # syntax=docker/dockerfile:1 -FROM ubuntu:18.04 as ospf-mdr +FROM rockylinux:8 as ospf-rpm +WORKDIR /opt +RUN yum update -y && \ + yum install -y epel-release dnf-plugins-core && \ + yum config-manager --set-enabled powertools && \ + yum update -y && \ + yum install -y \ + texinfo \ + rpm-build \ + texlive-base \ + texinfo-tex \ + texi2html \ + readline-devel \ + libpcap-devel \ + ImageMagick \ + git \ + automake \ + libtool \ + pkg-config \ + gcc-c++ \ + libcap-devel \ + make && \ + git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git && \ + cd ospf-mdr && \ + ./bootstrap.sh && \ + ./configure && \ + (make -f quagga.rpm.mk build || make -f quagga.rpm.mk build) && \ + mv .rpmbuild/RPMS/x86_64/quagga-mr-0.99*.rpm /opt/ && \ + yum autoremove -y && \ + yum clean all + +FROM ubuntu:18.04 as ospf-deb RUN apt-get update -y && \ apt-get install -y --no-install-recommends \ automake \ @@ -28,6 +59,6 @@ RUN git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git && \ ./bootstrap.sh && \ ./configure && \ make -j$(nproc) && \ - make -f quagga.deb.mk build || true + make -f qua.deb.mk build || true && \ cd /opt && \ rm -rf ospf-mdr diff --git a/dockerfiles/Dockerfile.rocky b/dockerfiles/Dockerfile.rocky index 7534fa05..42b47158 100644 --- a/dockerfiles/Dockerfile.rocky +++ b/dockerfiles/Dockerfile.rocky @@ -1,6 +1,7 @@ # syntax=docker/dockerfile:1 FROM rockylinux:8 ENV LANG en_US.UTF-8 +WORKDIR /opt # install system dependencies RUN yum update -y && \ @@ -63,7 +64,6 @@ RUN yum update -y && \ yum clean all # install core -WORKDIR /opt ARG CORE_PACKAGE=core_9.0.3_x86_64.rpm ARG PACKAGE_URL=https://github.com/coreemu/core/releases/latest/download/${CORE_PACKAGE} RUN yum update -y && \ diff --git a/dockerfiles/Dockerfile.ubuntu b/dockerfiles/Dockerfile.ubuntu index d22cde5b..8353c829 100644 --- a/dockerfiles/Dockerfile.ubuntu +++ b/dockerfiles/Dockerfile.ubuntu @@ -1,6 +1,7 @@ # syntax=docker/dockerfile:1 FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive +WORKDIR /opt # install system dependencies RUN apt-get update -y && \ @@ -69,7 +70,6 @@ RUN apt-get update -y && \ rm -rf /var/lib/apt/lists/* # install core -WORKDIR /opt ARG CORE_PACKAGE=core_9.0.3_amd64.deb ARG PACKAGE_URL=https://github.com/coreemu/core/releases/latest/download/${CORE_PACKAGE} RUN apt-get update -y && \