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"
|
|
|
|
|
|
|
|
# define variables
|
|
|
|
ARG PREFIX=/usr/local
|
|
|
|
ARG BRANCH=master
|
|
|
|
|
|
|
|
# define environment
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
2022-10-14 18:42:31 +01:00
|
|
|
# install basic dependencies
|
2022-05-26 05:43:52 +01:00
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y git sudo wget tzdata
|
2022-10-14 18:42:31 +01:00
|
|
|
|
|
|
|
# install core
|
|
|
|
WORKDIR /opt
|
2022-05-26 05:43:52 +01:00
|
|
|
RUN git clone https://github.com/coreemu/core
|
2022-10-14 18:42:31 +01:00
|
|
|
WORKDIR /opt/core
|
2022-05-26 05:43:52 +01:00
|
|
|
RUN git checkout ${BRANCH}
|
2022-11-28 22:02:46 +00:00
|
|
|
RUN ./setup.sh
|
2022-05-26 05:43:52 +01:00
|
|
|
RUN . /root/.bashrc && inv install -v -p ${PREFIX}
|
2022-10-14 18:42:31 +01:00
|
|
|
ENV PATH "$PATH:/opt/core/venv/bin"
|
|
|
|
|
|
|
|
# install emane
|
2022-11-28 22:02:46 +00:00
|
|
|
RUN apt-get install -y libpcap-dev libpcre3-dev libprotobuf-dev libxml2-dev protobuf-compiler unzip uuid-dev
|
2022-10-14 18:42:31 +01:00
|
|
|
WORKDIR /opt
|
|
|
|
RUN git clone https://github.com/adjacentlink/emane.git
|
|
|
|
RUN cd emane && \
|
|
|
|
./autogen.sh && \
|
|
|
|
./configure --prefix=/usr && \
|
|
|
|
make -j$(nproc) && \
|
|
|
|
make install
|
2022-11-28 22:02:46 +00:00
|
|
|
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip && \
|
|
|
|
mkdir protoc && \
|
|
|
|
unzip protoc-3.19.6-linux-x86_64.zip -d protoc
|
|
|
|
RUN PATH=/opt/protoc/bin:$PATH && \
|
|
|
|
cd emane/src/python && \
|
|
|
|
make clean && \
|
|
|
|
make
|
2022-10-14 18:42:31 +01:00
|
|
|
RUN /opt/core/venv/bin/python -m pip install emane/src/python
|
2022-05-26 05:43:52 +01:00
|
|
|
|
|
|
|
# run daemon
|
|
|
|
CMD ["core-daemon"]
|