-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
install: streamlines dockerfiles to focus on using and pulling built …
…packages from latest release, improvements to space used during build and emane python bindings
- Loading branch information
Showing
8 changed files
with
219 additions
and
308 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.