76 lines
1.9 KiB
Docker
76 lines
1.9 KiB
Docker
|
# syntax=docker/dockerfile:1
|
||
|
FROM ubuntu:22.04
|
||
|
LABEL Description="CORE Docker Ubuntu Image"
|
||
|
|
||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||
|
ARG PROTOC_VERSION=3.19.6
|
||
|
ARG VENV_PATH=/opt/core/venv
|
||
|
ENV PATH="$PATH:${VENV_PATH}/bin"
|
||
|
WORKDIR /opt
|
||
|
|
||
|
# install basic dependencies
|
||
|
RUN apt-get update -y && \
|
||
|
apt-get install -y --no-install-recommends \
|
||
|
ca-certificates \
|
||
|
python3 \
|
||
|
python3-tk \
|
||
|
python3-pip \
|
||
|
python3-venv \
|
||
|
libpcap-dev \
|
||
|
libpcre3-dev \
|
||
|
libprotobuf-dev \
|
||
|
libxml2-dev \
|
||
|
protobuf-compiler \
|
||
|
unzip \
|
||
|
uuid-dev \
|
||
|
automake \
|
||
|
gawk \
|
||
|
git \
|
||
|
wget \
|
||
|
libreadline-dev \
|
||
|
libtool \
|
||
|
pkg-config \
|
||
|
g++ \
|
||
|
make \
|
||
|
iputils-ping \
|
||
|
tcpdump && \
|
||
|
apt-get autoremove -y
|
||
|
|
||
|
# install core
|
||
|
COPY core_*.deb .
|
||
|
RUN apt-get install -y ./core_*.deb && \
|
||
|
rm -f core_*.deb
|
||
|
|
||
|
# install ospf mdr
|
||
|
RUN 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
|
||
|
|
||
|
# install emane
|
||
|
RUN wget 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 && \
|
||
|
./autogen.sh && \
|
||
|
./configure --prefix=/usr && \
|
||
|
make -j$(nproc) && \
|
||
|
make install && \
|
||
|
cd src/python && \
|
||
|
make clean && \
|
||
|
PATH=/opt/protoc/bin:$PATH make && \
|
||
|
${VENV_PATH}/bin/python -m pip install . && \
|
||
|
cd /opt && \
|
||
|
rm -rf protoc && \
|
||
|
rm -rf emane && \
|
||
|
rm -f protoc-${PROTOC_VERSION}-linux-x86_64.zip
|
||
|
|
||
|
WORKDIR /root
|