2021-09-17 22:46:01 +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"
|
2021-09-17 22:46:01 +01:00
|
|
|
|
|
|
|
ARG PREFIX=/usr/local
|
2022-01-12 23:30:10 +00:00
|
|
|
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
|
2021-09-17 22:46:01 +01:00
|
|
|
|
|
|
|
# install system dependencies
|
2023-09-21 18:54:08 +01:00
|
|
|
|
|
|
|
RUN apt-get update -y && \
|
|
|
|
apt-get install -y software-properties-common
|
|
|
|
|
|
|
|
RUN add-apt-repository "deb http://archive.ubuntu.com/ubuntu jammy universe"
|
|
|
|
|
2023-03-02 16:34:54 +00:00
|
|
|
RUN apt-get update -y && \
|
2021-09-17 22:46:01 +01:00
|
|
|
apt-get install -y --no-install-recommends \
|
|
|
|
automake \
|
|
|
|
bash \
|
|
|
|
ca-certificates \
|
|
|
|
ethtool \
|
|
|
|
gawk \
|
|
|
|
gcc \
|
|
|
|
g++ \
|
|
|
|
iproute2 \
|
|
|
|
iputils-ping \
|
|
|
|
libc-dev \
|
|
|
|
libev-dev \
|
|
|
|
libreadline-dev \
|
2023-09-21 18:54:08 +01:00
|
|
|
libtool \
|
2021-09-17 22:46:01 +01:00
|
|
|
nftables \
|
|
|
|
python3 \
|
|
|
|
python3-pip \
|
|
|
|
python3-tk \
|
|
|
|
pkg-config \
|
|
|
|
tk \
|
|
|
|
xauth \
|
|
|
|
xterm \
|
2022-09-28 21:07:51 +01:00
|
|
|
wireshark \
|
2023-09-21 18:54:08 +01:00
|
|
|
vim \
|
|
|
|
build-essential \
|
|
|
|
nano \
|
2022-09-28 21:07:51 +01:00
|
|
|
firefox \
|
|
|
|
net-tools \
|
|
|
|
rsync \
|
|
|
|
openssh-server \
|
|
|
|
openssh-client \
|
|
|
|
vsftpd \
|
|
|
|
atftpd \
|
|
|
|
atftp \
|
|
|
|
mini-httpd \
|
|
|
|
lynx \
|
|
|
|
tcpdump \
|
|
|
|
iperf \
|
|
|
|
iperf3 \
|
|
|
|
tshark \
|
|
|
|
openssh-sftp-server \
|
|
|
|
bind9 \
|
|
|
|
bind9-utils \
|
|
|
|
openvpn \
|
|
|
|
isc-dhcp-server \
|
|
|
|
isc-dhcp-client \
|
|
|
|
whois \
|
|
|
|
ipcalc \
|
|
|
|
socat \
|
2022-09-28 21:18:36 +01:00
|
|
|
hping3 \
|
2023-09-21 18:54:08 +01:00
|
|
|
libgtk-3-0 \
|
2022-09-28 21:18:36 +01:00
|
|
|
librest-0.7-0 \
|
2023-09-21 18:54:08 +01:00
|
|
|
libgtk-3-common \
|
2022-09-28 21:18:36 +01:00
|
|
|
dconf-gsettings-backend \
|
|
|
|
libsoup-gnome2.4-1 \
|
|
|
|
libsoup2.4-1 \
|
|
|
|
dconf-service \
|
2022-09-28 21:17:16 +01:00
|
|
|
x11-xserver-utils \
|
2022-09-28 22:14:48 +01:00
|
|
|
ftp \
|
2023-03-02 16:34:54 +00:00
|
|
|
git \
|
|
|
|
sudo \
|
|
|
|
wget \
|
|
|
|
tzdata \
|
|
|
|
libpcap-dev \
|
|
|
|
libpcre3-dev \
|
|
|
|
libprotobuf-dev \
|
|
|
|
libxml2-dev \
|
|
|
|
protobuf-compiler \
|
|
|
|
unzip \
|
|
|
|
uuid-dev \
|
|
|
|
iproute2 \
|
2023-09-21 18:54:08 +01:00
|
|
|
vlc \
|
|
|
|
iputils-ping && \
|
2023-03-02 16:34:54 +00:00
|
|
|
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) && \
|
2021-09-17 22:46:01 +01:00
|
|
|
make install && \
|
2023-03-02 16:34:54 +00:00
|
|
|
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-11-20 15:08:52 +00:00
|
|
|
|
2023-03-02 16:34:54 +00:00
|
|
|
WORKDIR /root
|
2022-11-20 15:08:52 +00:00
|
|
|
|
2023-09-21 18:54:08 +01:00
|
|
|
CMD /opt/core/venv/bin/core-daemon
|