install: updated dockerfiles for installing using the script based method for centos/ubuntu

This commit is contained in:
Blake Harnden 2022-10-14 10:42:31 -07:00
parent 7067b54a00
commit f43e8f7646
3 changed files with 51 additions and 63 deletions

View file

@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM ubuntu:20.04
FROM ubuntu:22.04
LABEL Description="CORE Docker Ubuntu Image"
# define variables
@ -9,26 +9,29 @@ ARG BRANCH=master
# define environment
ENV DEBIAN_FRONTEND=noninteractive
# install core
# install basic dependencies
RUN apt-get update && \
apt-get install -y git sudo wget tzdata
WORKDIR /root
# install core
WORKDIR /opt
RUN git clone https://github.com/coreemu/core
WORKDIR /root/core
WORKDIR /opt/core
RUN git checkout ${BRANCH}
RUN ./setup.sh
RUN NO_SYSTEM=1 ./setup.sh
RUN . /root/.bashrc && inv install -v -p ${PREFIX}
# install emane packages and python bindings
WORKDIR /root
RUN wget -q https://adjacentlink.com/downloads/emane/emane-1.3.3-release-1.ubuntu-20_04.amd64.tar.gz && \
tar xf emane*.tar.gz && \
cd emane-1.3.3-release-1/debs/ubuntu-20_04/amd64 && \
apt-get install -y ./emane*.deb ./python3-emane_*.deb && \
cd ../../../.. && \
rm emane-1.3.3-release-1.ubuntu-20_04.amd64.tar.gz && \
rm -rf emane-1.3.3-release-1
WORKDIR /root/core
RUN . /root/.bashrc && inv install-emane -v -e v1.3.3
ENV PATH "$PATH:/opt/core/venv/bin"
# install emane
RUN apt-get install -y libpcap-dev libpcre3-dev libprotobuf-dev libxml2-dev protobuf-compiler uuid-dev
WORKDIR /opt
RUN git clone https://github.com/adjacentlink/emane.git
RUN cd emane && \
./autogen.sh && \
./configure --prefix=/usr && \
make -j$(nproc) && \
make install
RUN /opt/core/venv/bin/python -m pip install emane/src/python
# run daemon
CMD ["core-daemon"]