updated to 9.0.3 merge
This commit is contained in:
commit
3f2db35e68
534 changed files with 13841 additions and 56536 deletions
143
Dockerfile
143
Dockerfile
|
@ -1,16 +1,23 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
FROM ubuntu:20.04
|
||||
LABEL Description="CORE Docker Image"
|
||||
FROM ubuntu:22.04
|
||||
LABEL Description="CORE Docker Ubuntu Image"
|
||||
|
||||
# define variables
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG PREFIX=/usr/local
|
||||
ARG BRANCH=master
|
||||
ARG CORE_TARBALL=core.tar.gz
|
||||
ARG OSPF_TARBALL=ospf.tar.gz
|
||||
ARG PROTOC_VERSION=3.19.6
|
||||
ARG VENV_PATH=/opt/core/venv
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV PATH="$PATH:${VENV_PATH}/bin"
|
||||
WORKDIR /opt
|
||||
|
||||
# install system dependencies
|
||||
RUN apt-get update && \
|
||||
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y software-properties-common
|
||||
|
||||
RUN add-apt-repository "deb http://archive.ubuntu.com/ubuntu jammy universe"
|
||||
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
automake \
|
||||
bash \
|
||||
|
@ -24,20 +31,19 @@ RUN apt-get update && \
|
|||
libc-dev \
|
||||
libev-dev \
|
||||
libreadline-dev \
|
||||
libtool \ libtk-img \ make \
|
||||
libtool \
|
||||
nftables \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-tk \
|
||||
pkg-config \
|
||||
systemctl \
|
||||
tk \
|
||||
wget \
|
||||
xauth \
|
||||
xterm \
|
||||
vim \
|
||||
nano \
|
||||
wireshark \
|
||||
vim \
|
||||
build-essential \
|
||||
nano \
|
||||
firefox \
|
||||
net-tools \
|
||||
rsync \
|
||||
|
@ -49,7 +55,6 @@ RUN apt-get update && \
|
|||
mini-httpd \
|
||||
lynx \
|
||||
tcpdump \
|
||||
wireshark \
|
||||
iperf \
|
||||
iperf3 \
|
||||
tshark \
|
||||
|
@ -63,77 +68,59 @@ RUN apt-get update && \
|
|||
ipcalc \
|
||||
socat \
|
||||
hping3 \
|
||||
libgtk-3-0 \
|
||||
libgtk-3-0 \
|
||||
librest-0.7-0 \
|
||||
libgtk-3-common \
|
||||
libgtk-3-common \
|
||||
dconf-gsettings-backend \
|
||||
libsoup-gnome2.4-1 \
|
||||
libsoup2.4-1 \
|
||||
dconf-service \
|
||||
x11-xserver-utils \
|
||||
ftp \
|
||||
&& apt-get clean
|
||||
# install python dependencies
|
||||
RUN python3 -m pip install \
|
||||
grpcio==1.27.2 \
|
||||
grpcio-tools==1.27.2 \
|
||||
poetry==1.1.7
|
||||
# retrieve, build, and install core
|
||||
RUN wget -q -O ${CORE_TARBALL} https://api.github.com/repos/coreemu/core/tarball/${BRANCH} && \
|
||||
tar xf ${CORE_TARBALL} && \
|
||||
cd coreemu-core* && \
|
||||
./bootstrap.sh && \
|
||||
./configure && \
|
||||
make -j $(nproc) && \
|
||||
make install && \
|
||||
cd daemon && \
|
||||
python3 -m poetry build -f wheel && \
|
||||
python3 -m pip install dist/* && \
|
||||
cp scripts/* ${PREFIX}/bin && \
|
||||
mkdir /etc/core && \
|
||||
cp -n data/core.conf /etc/core && \
|
||||
cp -n data/logging.conf /etc/core && \
|
||||
mkdir -p ${PREFIX}/share/core && \
|
||||
cp -r examples ${PREFIX}/share/core && \
|
||||
echo '\
|
||||
[Unit]\n\
|
||||
Description=Common Open Research Emulator Service\n\
|
||||
After=network.target\n\
|
||||
\n\
|
||||
[Service]\n\
|
||||
Type=simple\n\
|
||||
ExecStart=/usr/local/bin/core-daemon\n\
|
||||
TasksMax=infinity\n\
|
||||
\n\
|
||||
[Install]\n\
|
||||
WantedBy=multi-user.target\
|
||||
' > /lib/systemd/system/core-daemon.service && \
|
||||
cd ../.. && \
|
||||
rm ${CORE_TARBALL} && \
|
||||
rm -rf coreemu-core*
|
||||
# retrieve, build, and install ospf mdr
|
||||
RUN wget -q -O ${OSPF_TARBALL} https://github.com/USNavalResearchLaboratory/ospf-mdr/tarball/master && \
|
||||
tar xf ${OSPF_TARBALL} && \
|
||||
cd USNavalResearchLaboratory-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 .. && \
|
||||
rm ${OSPF_TARBALL} && \
|
||||
rm -rf USNavalResearchLaboratory-ospf-mdr*
|
||||
# retrieve and install emane packages
|
||||
RUN wget -q https://adjacentlink.com/downloads/emane/emane-1.2.7-release-1.ubuntu-20_04.amd64.tar.gz && \
|
||||
tar xf emane*.tar.gz && \
|
||||
cd emane-1.2.7-release-1/debs/ubuntu-20_04/amd64 && \
|
||||
apt-get install -y ./emane*.deb ./python3-emane_*.deb && \
|
||||
cd ../../../.. && \
|
||||
rm emane-1.2.7-release-1.ubuntu-20_04.amd64.tar.gz && \
|
||||
rm -rf emane-1.2.7-release-1
|
||||
CMD ["systemctl", "start", "core-daemon"]
|
||||
git \
|
||||
sudo \
|
||||
wget \
|
||||
tzdata \
|
||||
libpcap-dev \
|
||||
libpcre3-dev \
|
||||
libprotobuf-dev \
|
||||
libxml2-dev \
|
||||
protobuf-compiler \
|
||||
unzip \
|
||||
uuid-dev \
|
||||
iproute2 \
|
||||
vlc \
|
||||
iputils-ping && \
|
||||
apt-get autoremove -y
|
||||
|
||||
# install core
|
||||
RUN git clone https://github.com/coreemu/core && \
|
||||
cd core && \
|
||||
git checkout ${BRANCH} && \
|
||||
./setup.sh && \
|
||||
PATH=/root/.local/bin:$PATH inv install -v -p ${PREFIX} && \
|
||||
cd /opt && \
|
||||
rm -rf ospf-mdr
|
||||
|
||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly -y && \
|
||||
echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
|
||||
# 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
|
||||
|
||||
CMD /opt/core/venv/bin/core-daemon
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue