2022-05-26 05:43:52 +01:00
|
|
|
# syntax=docker/dockerfile:1
|
2022-10-14 18:42:31 +01:00
|
|
|
FROM ubuntu:22.04
|
2022-05-26 05:43:52 +01:00
|
|
|
LABEL Description="CORE Docker Ubuntu Image"
|
|
|
|
|
|
|
|
ARG PREFIX=/usr/local
|
|
|
|
ARG BRANCH=master
|
2023-03-02 16:34:54 +00:00
|
|
|
ARG PROTOC_VERSION=3.19.6
|
|
|
|
ARG VENV_PATH=/opt/core/venv
|
2022-05-26 05:43:52 +01:00
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
2023-03-02 16:34:54 +00:00
|
|
|
ENV PATH="$PATH:${VENV_PATH}/bin"
|
|
|
|
WORKDIR /opt
|
2022-05-26 05:43:52 +01:00
|
|
|
|
2023-03-02 16:34:54 +00:00
|
|
|
# install system dependencies
|
|
|
|
RUN apt-get update -y && \
|
|
|
|
apt-get install -y --no-install-recommends \
|
|
|
|
ca-certificates \
|
|
|
|
git \
|
|
|
|
sudo \
|
|
|
|
wget \
|
|
|
|
tzdata \
|
|
|
|
libpcap-dev \
|
|
|
|
libpcre3-dev \
|
|
|
|
libprotobuf-dev \
|
|
|
|
libxml2-dev \
|
|
|
|
protobuf-compiler \
|
|
|
|
unzip \
|
|
|
|
uuid-dev \
|
|
|
|
iproute2 \
|
|
|
|
iputils-ping \
|
|
|
|
tcpdump && \
|
|
|
|
apt-get autoremove -y
|
2022-10-14 18:42:31 +01:00
|
|
|
|
|
|
|
# install core
|
2023-03-02 16:34:54 +00:00
|
|
|
RUN git clone https://github.com/coreemu/core && \
|
|
|
|
cd core && \
|
|
|
|
git checkout ${BRANCH} && \
|
|
|
|
./setup.sh && \
|
2023-07-25 19:12:24 +01:00
|
|
|
PATH=/root/.local/bin:$PATH inv install -v -p ${PREFIX} && \
|
2023-03-02 16:34:54 +00:00
|
|
|
cd /opt && \
|
|
|
|
rm -rf ospf-mdr
|
2022-10-14 18:42:31 +01:00
|
|
|
|
|
|
|
# install emane
|
2023-03-02 16:34:54 +00:00
|
|
|
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
|
2022-11-28 22:02:46 +00:00
|
|
|
mkdir protoc && \
|
2023-03-02 16:34:54 +00:00
|
|
|
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
|
2022-05-26 05:43:52 +01:00
|
|
|
|
2023-03-02 16:34:54 +00:00
|
|
|
WORKDIR /root
|