Skip to content

Commit

Permalink
install: streamlines dockerfiles to focus on using and pulling built …
Browse files Browse the repository at this point in the history
…packages from latest release, improvements to space used during build and emane python bindings
  • Loading branch information
bharnden committed Nov 17, 2023
1 parent a584e60 commit 54dc7e6
Show file tree
Hide file tree
Showing 8 changed files with 219 additions and 308 deletions.
79 changes: 0 additions & 79 deletions dockerfiles/Dockerfile.centos

This file was deleted.

93 changes: 0 additions & 93 deletions dockerfiles/Dockerfile.centos-package

This file was deleted.

40 changes: 40 additions & 0 deletions dockerfiles/Dockerfile.emane-python
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# syntax=docker/dockerfile:1
FROM ubuntu:22.04
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
automake \
ca-certificates \
g++ \
git \
libpcap-dev \
libpcre3-dev \
libprotobuf-dev \
libtool \
libxml2-dev \
make \
pkg-config \
python3 \
python3-pip \
unzip \
uuid-dev \
wget && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
WORKDIR /opt
ARG PROTOC_VERSION=3.19.6
RUN wget -q https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
mkdir protoc && \
unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d protoc && \
git clone https://github.com/adjacentlink/emane.git && \
cd emane && \
git checkout v1.5.1 && \
./autogen.sh && \
PYTHON=python3 ./configure --prefix=/usr && \
cd src/python && \
PATH=/opt/protoc/bin:$PATH make && \
python3 setup.py bdist_wheel && \
mv dist/*.whl /opt/ && \
cd /opt && \
rm -rf protoc && \
rm -rf emane && \
rm -f protoc-${PROTOC_VERSION}-linux-x86_64.zip
33 changes: 33 additions & 0 deletions dockerfiles/Dockerfile.ospf-mdr
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# syntax=docker/dockerfile:1
FROM ubuntu:18.04 as ospf-mdr
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
automake \
build-essential:native \
ca-certificates \
debhelper \
dpkg-dev \
fakeroot \
g++ \
gawk \
git \
groff \
imagemagick \
libreadline-dev \
libtool \
make \
texinfo \
texlive-generic-recommended \
texlive-latex-base \
pkg-config && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
WORKDIR /opt
RUN git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git && \
cd ospf-mdr && \
./bootstrap.sh && \
./configure && \
make -j$(nproc) && \
make -f quagga.deb.mk build || true
cd /opt && \
rm -rf ospf-mdr
80 changes: 80 additions & 0 deletions dockerfiles/Dockerfile.rocky
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# syntax=docker/dockerfile:1
FROM rockylinux:8
ENV LANG en_US.UTF-8

# install system dependencies
RUN yum update -y && \
yum install -y \
xterm \
wget \
tcpdump \
python39 \
python39-tkinter \
iproute-tc && \
yum autoremove -y && \
yum clean all

# install ospf mdr
RUN yum update -y && \
yum install -y \
automake \
gcc-c++ \
libtool \
make \
pkg-config \
readline-devel \
git && \
git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git && \
cd ospf-mdr && \
./bootstrap.sh && \
./configure --disable-doc --enable-user=root --enable-group=root \
--with-cflags=-ggdb --sysconfdir=/usr/local/etc/quagga --enable-vtysh \
--localstatedir=/var/run/quagga && \
make -j$(nproc) && \
make install && \
cd /opt && \
rm -rf ospf-mdr && \
yum remove -y \
automake \
gcc-c++ \
libtool \
make \
pkg-config \
readline-devel \
git && \
yum autoremove -y --skip-broken && \
yum clean all

# install emane
ARG EMANE_VERSION=1.5.1
ARG EMANE_RELEASE=emane-${EMANE_VERSION}-release-1
ARG EMANE_PACKAGE=${EMANE_RELEASE}.el8.x86_64.tar.gz
RUN yum update -y && \
wget -q https://adjacentlink.com/downloads/emane/${EMANE_PACKAGE} && \
tar xf ${EMANE_PACKAGE} && \
cd ${EMANE_RELEASE}/rpms/el8/x86_64 && \
rm emane-spectrum-tools-*.rpm emane-model-lte*.rpm && \
rm *devel*.rpm && \
yum install -y ./emane*.rpm ./python3-emane-${EMANE_VERSION}-1.el8.noarch.rpm && \
cd ../../../.. && \
rm ${EMANE_PACKAGE} && \
rm -rf ${EMANE_RELEASE} && \
yum autoremove -y && \
yum clean all

# install core
WORKDIR /opt
ARG PACKAGE_URL=https://github.com/coreemu/core/releases/latest/download/core_9.0.3_x86_64.rpm
RUN yum update -y && \
wget -q ${PACKAGE_URL} && \
PYTHON=python3.9 yum install -y ./core_*.rpm && \
rm -f core_*.rpm && \
yum autoremove -y && \
yum clean all

# install emane python bindings
ARG VENV_PATH=/opt/core/venv
COPY --from=emane-python /opt/emane-*.whl .
RUN ${VENV_PATH}/bin/python -m pip install ./emane-*.whl

WORKDIR /root
Loading

0 comments on commit 54dc7e6

Please sign in to comment.