updated dockerfiles to run commands to save space optimally
This commit is contained in:
parent
fec400ac2e
commit
d45eeb6d2e
8 changed files with 223 additions and 433 deletions
|
@ -2,40 +2,51 @@
|
||||||
FROM centos:7
|
FROM centos:7
|
||||||
LABEL Description="CORE Docker CentOS Image"
|
LABEL Description="CORE Docker CentOS Image"
|
||||||
|
|
||||||
# define variables
|
|
||||||
ARG PREFIX=/usr
|
ARG PREFIX=/usr
|
||||||
ARG BRANCH=master
|
ARG BRANCH=master
|
||||||
|
|
||||||
# define environment
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
|
||||||
ENV LANG en_US.UTF-8
|
ENV LANG en_US.UTF-8
|
||||||
|
ARG PROTOC_VERSION=3.19.6
|
||||||
|
ARG VENV_PATH=/opt/core/venv
|
||||||
|
ENV PATH="$PATH:${VENV_PATH}/bin"
|
||||||
|
WORKDIR /opt
|
||||||
|
|
||||||
# install basic dependencies
|
# install system dependencies
|
||||||
RUN yum -y update && \
|
RUN yum -y update && \
|
||||||
yum install -y git sudo wget tzdata unzip
|
yum install -y \
|
||||||
|
git \
|
||||||
|
sudo \
|
||||||
|
wget \
|
||||||
|
tzdata \
|
||||||
|
unzip \
|
||||||
|
libpcap-devel \
|
||||||
|
libpcre3-devel \
|
||||||
|
libxml2-devel \
|
||||||
|
protobuf-devel \
|
||||||
|
unzip \
|
||||||
|
uuid-devel \
|
||||||
|
tcpdump \
|
||||||
|
make && \
|
||||||
|
yum-builddep -y python3 && \
|
||||||
|
yum autoremove -y
|
||||||
|
|
||||||
# install python3.9
|
# install python3.9
|
||||||
WORKDIR /opt
|
RUN wget https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz && \
|
||||||
RUN wget https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz
|
tar xf Python-3.9.15.tgz && \
|
||||||
RUN tar xf Python-3.9.15.tgz
|
cd Python-3.9.15 && \
|
||||||
RUN yum install -y make && yum-builddep -y python3
|
|
||||||
RUN cd Python-3.9.15 && \
|
|
||||||
./configure --enable-optimizations --with-ensurepip=install && \
|
./configure --enable-optimizations --with-ensurepip=install && \
|
||||||
make -j$(nproc) altinstall
|
make -j$(nproc) altinstall && \
|
||||||
RUN python3.9 -m pip install --upgrade pip
|
python3.9 -m pip install --upgrade pip && \
|
||||||
|
cd /opt && \
|
||||||
|
rm -rf Python-3.9.15
|
||||||
|
|
||||||
# install core
|
# install core
|
||||||
WORKDIR /opt
|
RUN git clone https://github.com/coreemu/core && \
|
||||||
RUN git clone https://github.com/coreemu/core
|
cd core && \
|
||||||
WORKDIR /opt/core
|
git checkout ${BRANCH} && \
|
||||||
RUN git checkout ${BRANCH}
|
PYTHON=/usr/local/bin/python3.9 ./setup.sh && \
|
||||||
RUN PYTHON=/usr/local/bin/python3.9 ./setup.sh
|
. /root/.bashrc && PYTHON=/usr/local/bin/python3.9 inv install -v -p ${PREFIX} --no-python
|
||||||
RUN . /root/.bashrc && PYTHON=/usr/local/bin/python3.9 inv install -v -p ${PREFIX} --no-python
|
|
||||||
ENV PATH "$PATH:/opt/core/venv/bin"
|
|
||||||
|
|
||||||
# install emane
|
# install emane
|
||||||
RUN yum install -y libpcap-devel libpcre3-devel libxml2-devel protobuf-devel unzip uuid-devel
|
|
||||||
WORKDIR /opt
|
|
||||||
RUN wget -q https://adjacentlink.com/downloads/emane/emane-1.3.3-release-1.el7.x86_64.tar.gz && \
|
RUN wget -q https://adjacentlink.com/downloads/emane/emane-1.3.3-release-1.el7.x86_64.tar.gz && \
|
||||||
tar xf emane-1.3.3-release-1.el7.x86_64.tar.gz && \
|
tar xf emane-1.3.3-release-1.el7.x86_64.tar.gz && \
|
||||||
cd emane-1.3.3-release-1/rpms/el7/x86_64 && \
|
cd emane-1.3.3-release-1/rpms/el7/x86_64 && \
|
||||||
|
@ -45,18 +56,21 @@ RUN wget -q https://adjacentlink.com/downloads/emane/emane-1.3.3-release-1.el7.x
|
||||||
rm emane-1.3.3-release-1.el7.x86_64.tar.gz && \
|
rm emane-1.3.3-release-1.el7.x86_64.tar.gz && \
|
||||||
rm -rf emane-1.3.3-release-1
|
rm -rf emane-1.3.3-release-1
|
||||||
|
|
||||||
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip && \
|
# install emane python bindings
|
||||||
|
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
|
||||||
mkdir protoc && \
|
mkdir protoc && \
|
||||||
unzip protoc-3.19.6-linux-x86_64.zip -d protoc
|
unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d protoc && \
|
||||||
RUN git clone https://github.com/adjacentlink/emane.git
|
git clone https://github.com/adjacentlink/emane.git && \
|
||||||
RUN PATH=/opt/protoc/bin:$PATH && \
|
|
||||||
cd emane && \
|
cd emane && \
|
||||||
git checkout v1.3.3 && \
|
git checkout v1.3.3 && \
|
||||||
./autogen.sh && \
|
./autogen.sh && \
|
||||||
PYTHON=/opt/core/venv/bin/python ./configure --prefix=/usr && \
|
PYTHON=${VENV_PATH}/bin/python ./configure --prefix=/usr && \
|
||||||
cd src/python && \
|
cd src/python && \
|
||||||
make && \
|
PATH=/opt/protoc/bin:$PATH make && \
|
||||||
/opt/core/venv/bin/python -m pip install .
|
${VENV_PATH}/bin/python -m pip install . && \
|
||||||
|
cd /opt && \
|
||||||
|
rm -rf protoc && \
|
||||||
|
rm -rf emane && \
|
||||||
|
rm -f protoc-${PROTOC_VERSION}-linux-x86_64.zip
|
||||||
|
|
||||||
# run daemon
|
WORKDIR /root
|
||||||
CMD ["core-daemon"]
|
|
||||||
|
|
|
@ -1,76 +0,0 @@
|
||||||
# syntax=docker/dockerfile:1
|
|
||||||
FROM centos:7
|
|
||||||
LABEL Description="CORE Docker CentOS Image"
|
|
||||||
|
|
||||||
ARG PREFIX=/usr
|
|
||||||
ARG BRANCH=master
|
|
||||||
ENV LANG en_US.UTF-8
|
|
||||||
ARG PROTOC_VERSION=3.19.6
|
|
||||||
ARG VENV_PATH=/opt/core/venv
|
|
||||||
ENV PATH="$PATH:${VENV_PATH}/bin"
|
|
||||||
WORKDIR /opt
|
|
||||||
|
|
||||||
# install system dependencies
|
|
||||||
RUN yum -y update && \
|
|
||||||
yum install -y \
|
|
||||||
git \
|
|
||||||
sudo \
|
|
||||||
wget \
|
|
||||||
tzdata \
|
|
||||||
unzip \
|
|
||||||
libpcap-devel \
|
|
||||||
libpcre3-devel \
|
|
||||||
libxml2-devel \
|
|
||||||
protobuf-devel \
|
|
||||||
unzip \
|
|
||||||
uuid-devel \
|
|
||||||
tcpdump \
|
|
||||||
make && \
|
|
||||||
yum-builddep -y python3 && \
|
|
||||||
yum autoremove -y
|
|
||||||
|
|
||||||
# install python3.9
|
|
||||||
RUN wget https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz && \
|
|
||||||
tar xf Python-3.9.15.tgz && \
|
|
||||||
cd Python-3.9.15 && \
|
|
||||||
./configure --enable-optimizations --with-ensurepip=install && \
|
|
||||||
make -j$(nproc) altinstall && \
|
|
||||||
python3.9 -m pip install --upgrade pip && \
|
|
||||||
cd /opt && \
|
|
||||||
rm -rf Python-3.9.15
|
|
||||||
|
|
||||||
# install core
|
|
||||||
RUN git clone https://github.com/coreemu/core && \
|
|
||||||
cd core && \
|
|
||||||
git checkout ${BRANCH} && \
|
|
||||||
PYTHON=/usr/local/bin/python3.9 ./setup.sh && \
|
|
||||||
. /root/.bashrc && PYTHON=/usr/local/bin/python3.9 inv install -v -p ${PREFIX} --no-python
|
|
||||||
|
|
||||||
# install emane
|
|
||||||
RUN wget -q https://adjacentlink.com/downloads/emane/emane-1.3.3-release-1.el7.x86_64.tar.gz && \
|
|
||||||
tar xf emane-1.3.3-release-1.el7.x86_64.tar.gz && \
|
|
||||||
cd emane-1.3.3-release-1/rpms/el7/x86_64 && \
|
|
||||||
yum install -y epel-release && \
|
|
||||||
yum install -y ./openstatistic*.rpm ./emane*.rpm ./python3-emane_*.rpm && \
|
|
||||||
cd ../../../.. && \
|
|
||||||
rm emane-1.3.3-release-1.el7.x86_64.tar.gz && \
|
|
||||||
rm -rf emane-1.3.3-release-1
|
|
||||||
|
|
||||||
# install emane python bindings
|
|
||||||
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 && \
|
|
||||||
git checkout v1.3.3 && \
|
|
||||||
./autogen.sh && \
|
|
||||||
PYTHON=${VENV_PATH}/bin/python ./configure --prefix=/usr && \
|
|
||||||
cd src/python && \
|
|
||||||
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
|
|
|
@ -2,40 +2,64 @@
|
||||||
FROM centos:7
|
FROM centos:7
|
||||||
LABEL Description="CORE CentOS Image"
|
LABEL Description="CORE CentOS Image"
|
||||||
|
|
||||||
|
ENV LANG en_US.UTF-8
|
||||||
|
ARG PROTOC_VERSION=3.19.6
|
||||||
|
ARG VENV_PATH=/opt/core/venv
|
||||||
|
ENV PATH="$PATH:${VENV_PATH}/bin"
|
||||||
|
WORKDIR /opt
|
||||||
|
|
||||||
# install basic dependencies
|
# install basic dependencies
|
||||||
RUN yum update -y && yum install -y wget
|
RUN yum -y update && \
|
||||||
|
yum install -y \
|
||||||
|
git \
|
||||||
|
sudo \
|
||||||
|
wget \
|
||||||
|
tzdata \
|
||||||
|
unzip \
|
||||||
|
libpcap-devel \
|
||||||
|
libpcre3-devel \
|
||||||
|
libxml2-devel \
|
||||||
|
protobuf-devel \
|
||||||
|
unzip \
|
||||||
|
uuid-devel \
|
||||||
|
tcpdump \
|
||||||
|
automake \
|
||||||
|
gawk \
|
||||||
|
libreadline-devel \
|
||||||
|
libtool \
|
||||||
|
pkg-config \
|
||||||
|
make && \
|
||||||
|
yum-builddep -y python3 && \
|
||||||
|
yum autoremove -y
|
||||||
|
|
||||||
# install python3.9
|
# install python3.9
|
||||||
WORKDIR /opt
|
RUN wget https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz && \
|
||||||
RUN wget https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz
|
tar xf Python-3.9.15.tgz && \
|
||||||
RUN tar xf Python-3.9.15.tgz
|
cd Python-3.9.15 && \
|
||||||
RUN yum install -y make && yum-builddep -y python3
|
|
||||||
RUN cd Python-3.9.15 && \
|
|
||||||
./configure --enable-optimizations --with-ensurepip=install && \
|
./configure --enable-optimizations --with-ensurepip=install && \
|
||||||
make -j$(nproc) altinstall
|
make -j$(nproc) altinstall && \
|
||||||
RUN python3.9 -m pip install --upgrade pip
|
python3.9 -m pip install --upgrade pip && \
|
||||||
|
cd /opt && \
|
||||||
|
rm -rf Python-3.9.15
|
||||||
|
|
||||||
# install core
|
# install core
|
||||||
WORKDIR /opt/core
|
|
||||||
COPY core_*.rpm .
|
COPY core_*.rpm .
|
||||||
RUN PYTHON=/usr/local/bin/python3.9 yum install -y ./core_*.rpm
|
RUN PYTHON=/usr/local/bin/python3.9 yum install -y ./core_*.rpm && \
|
||||||
ENV PATH "$PATH:/opt/core/venv/bin"
|
rm -f core_*.rpm
|
||||||
|
|
||||||
# install ospf mdr
|
# install ospf mdr
|
||||||
RUN yum install -y automake gawk git libreadline-devel libtool pkg-config
|
RUN git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git && \
|
||||||
WORKDIR /opt
|
cd ospf-mdr && \
|
||||||
RUN git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git
|
|
||||||
RUN cd ospf-mdr && \
|
|
||||||
./bootstrap.sh && \
|
./bootstrap.sh && \
|
||||||
./configure --disable-doc --enable-user=root --enable-group=root \
|
./configure --disable-doc --enable-user=root --enable-group=root \
|
||||||
--with-cflags=-ggdb --sysconfdir=/usr/local/etc/quagga --enable-vtysh \
|
--with-cflags=-ggdb --sysconfdir=/usr/local/etc/quagga --enable-vtysh \
|
||||||
--localstatedir=/var/run/quagga && \
|
--localstatedir=/var/run/quagga && \
|
||||||
make -j$(nproc) && \
|
make -j$(nproc) && \
|
||||||
make install
|
make install && \
|
||||||
|
cd /opt && \
|
||||||
|
rm -rf ospf-mdr
|
||||||
|
|
||||||
# install emane
|
# install emane
|
||||||
RUN yum install -y libpcap-devel libpcre3-devel libxml2-devel protobuf-devel unzip uuid-devel
|
|
||||||
WORKDIR /opt
|
|
||||||
RUN wget -q https://adjacentlink.com/downloads/emane/emane-1.3.3-release-1.el7.x86_64.tar.gz && \
|
RUN wget -q https://adjacentlink.com/downloads/emane/emane-1.3.3-release-1.el7.x86_64.tar.gz && \
|
||||||
tar xf emane-1.3.3-release-1.el7.x86_64.tar.gz && \
|
tar xf emane-1.3.3-release-1.el7.x86_64.tar.gz && \
|
||||||
cd emane-1.3.3-release-1/rpms/el7/x86_64 && \
|
cd emane-1.3.3-release-1/rpms/el7/x86_64 && \
|
||||||
|
@ -44,15 +68,20 @@ RUN wget -q https://adjacentlink.com/downloads/emane/emane-1.3.3-release-1.el7.x
|
||||||
cd ../../../.. && \
|
cd ../../../.. && \
|
||||||
rm emane-1.3.3-release-1.el7.x86_64.tar.gz && \
|
rm emane-1.3.3-release-1.el7.x86_64.tar.gz && \
|
||||||
rm -rf emane-1.3.3-release-1
|
rm -rf emane-1.3.3-release-1
|
||||||
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip && \
|
|
||||||
|
# install emane python bindings
|
||||||
|
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
|
||||||
mkdir protoc && \
|
mkdir protoc && \
|
||||||
unzip protoc-3.19.6-linux-x86_64.zip -d protoc
|
unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d protoc && \
|
||||||
RUN git clone https://github.com/adjacentlink/emane.git
|
git clone https://github.com/adjacentlink/emane.git && \
|
||||||
RUN PATH=/opt/protoc/bin:$PATH && \
|
|
||||||
cd emane && \
|
cd emane && \
|
||||||
git checkout v1.3.3 && \
|
git checkout v1.3.3 && \
|
||||||
./autogen.sh && \
|
./autogen.sh && \
|
||||||
PYTHON=/opt/core/venv/bin/python ./configure --prefix=/usr && \
|
PYTHON=${VENV_PATH}/bin/python ./configure --prefix=/usr && \
|
||||||
cd src/python && \
|
cd src/python && \
|
||||||
make && \
|
PATH=/opt/protoc/bin:$PATH make && \
|
||||||
/opt/core/venv/bin/python -m pip install .
|
${VENV_PATH}/bin/python -m pip install . && \
|
||||||
|
cd /opt && \
|
||||||
|
rm -rf protoc && \
|
||||||
|
rm -rf emane && \
|
||||||
|
rm -f protoc-${PROTOC_VERSION}-linux-x86_64.zip
|
||||||
|
|
|
@ -1,87 +0,0 @@
|
||||||
# syntax=docker/dockerfile:1
|
|
||||||
FROM centos:7
|
|
||||||
LABEL Description="CORE CentOS Image"
|
|
||||||
|
|
||||||
ENV LANG en_US.UTF-8
|
|
||||||
ARG PROTOC_VERSION=3.19.6
|
|
||||||
ARG VENV_PATH=/opt/core/venv
|
|
||||||
ENV PATH="$PATH:${VENV_PATH}/bin"
|
|
||||||
WORKDIR /opt
|
|
||||||
|
|
||||||
# install basic dependencies
|
|
||||||
RUN yum -y update && \
|
|
||||||
yum install -y \
|
|
||||||
git \
|
|
||||||
sudo \
|
|
||||||
wget \
|
|
||||||
tzdata \
|
|
||||||
unzip \
|
|
||||||
libpcap-devel \
|
|
||||||
libpcre3-devel \
|
|
||||||
libxml2-devel \
|
|
||||||
protobuf-devel \
|
|
||||||
unzip \
|
|
||||||
uuid-devel \
|
|
||||||
tcpdump \
|
|
||||||
automake \
|
|
||||||
gawk \
|
|
||||||
libreadline-devel \
|
|
||||||
libtool \
|
|
||||||
pkg-config \
|
|
||||||
make && \
|
|
||||||
yum-builddep -y python3 && \
|
|
||||||
yum autoremove -y
|
|
||||||
|
|
||||||
# install python3.9
|
|
||||||
RUN wget https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz && \
|
|
||||||
tar xf Python-3.9.15.tgz && \
|
|
||||||
cd Python-3.9.15 && \
|
|
||||||
./configure --enable-optimizations --with-ensurepip=install && \
|
|
||||||
make -j$(nproc) altinstall && \
|
|
||||||
python3.9 -m pip install --upgrade pip && \
|
|
||||||
cd /opt && \
|
|
||||||
rm -rf Python-3.9.15
|
|
||||||
|
|
||||||
# install core
|
|
||||||
COPY core_*.rpm .
|
|
||||||
RUN PYTHON=/usr/local/bin/python3.9 yum install -y ./core_*.rpm && \
|
|
||||||
rm -f core_*.rpm
|
|
||||||
|
|
||||||
# install ospf mdr
|
|
||||||
RUN git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git && \
|
|
||||||
cd 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 /opt && \
|
|
||||||
rm -rf ospf-mdr
|
|
||||||
|
|
||||||
# install emane
|
|
||||||
RUN wget -q https://adjacentlink.com/downloads/emane/emane-1.3.3-release-1.el7.x86_64.tar.gz && \
|
|
||||||
tar xf emane-1.3.3-release-1.el7.x86_64.tar.gz && \
|
|
||||||
cd emane-1.3.3-release-1/rpms/el7/x86_64 && \
|
|
||||||
yum install -y epel-release && \
|
|
||||||
yum install -y ./openstatistic*.rpm ./emane*.rpm ./python3-emane_*.rpm && \
|
|
||||||
cd ../../../.. && \
|
|
||||||
rm emane-1.3.3-release-1.el7.x86_64.tar.gz && \
|
|
||||||
rm -rf emane-1.3.3-release-1
|
|
||||||
|
|
||||||
# install emane python bindings
|
|
||||||
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 && \
|
|
||||||
git checkout v1.3.3 && \
|
|
||||||
./autogen.sh && \
|
|
||||||
PYTHON=${VENV_PATH}/bin/python ./configure --prefix=/usr && \
|
|
||||||
cd src/python && \
|
|
||||||
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
|
|
|
@ -2,43 +2,61 @@
|
||||||
FROM ubuntu:22.04
|
FROM ubuntu:22.04
|
||||||
LABEL Description="CORE Docker Ubuntu Image"
|
LABEL Description="CORE Docker Ubuntu Image"
|
||||||
|
|
||||||
# define variables
|
|
||||||
ARG PREFIX=/usr/local
|
ARG PREFIX=/usr/local
|
||||||
ARG BRANCH=master
|
ARG BRANCH=master
|
||||||
|
ARG PROTOC_VERSION=3.19.6
|
||||||
# define environment
|
ARG VENV_PATH=/opt/core/venv
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
ENV PATH="$PATH:${VENV_PATH}/bin"
|
||||||
|
WORKDIR /opt
|
||||||
|
|
||||||
# install basic dependencies
|
# install system dependencies
|
||||||
RUN apt-get update && \
|
RUN apt-get update -y && \
|
||||||
apt-get install -y git sudo wget tzdata
|
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
|
||||||
|
|
||||||
# install core
|
# install core
|
||||||
WORKDIR /opt
|
RUN git clone https://github.com/coreemu/core && \
|
||||||
RUN git clone https://github.com/coreemu/core
|
cd core && \
|
||||||
WORKDIR /opt/core
|
git checkout ${BRANCH} && \
|
||||||
RUN git checkout ${BRANCH}
|
./setup.sh && \
|
||||||
RUN ./setup.sh
|
. /root/.bashrc && \
|
||||||
RUN . /root/.bashrc && inv install -v -p ${PREFIX}
|
inv install -v -p ${PREFIX} && \
|
||||||
ENV PATH "$PATH:/opt/core/venv/bin"
|
cd /opt && \
|
||||||
|
rm -rf ospf-mdr
|
||||||
|
|
||||||
# install emane
|
# install emane
|
||||||
RUN apt-get install -y libpcap-dev libpcre3-dev libprotobuf-dev libxml2-dev protobuf-compiler unzip uuid-dev
|
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
|
||||||
WORKDIR /opt
|
mkdir protoc && \
|
||||||
RUN git clone https://github.com/adjacentlink/emane.git
|
unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d protoc && \
|
||||||
RUN cd emane && \
|
git clone https://github.com/adjacentlink/emane.git && \
|
||||||
|
cd emane && \
|
||||||
./autogen.sh && \
|
./autogen.sh && \
|
||||||
./configure --prefix=/usr && \
|
./configure --prefix=/usr && \
|
||||||
make -j$(nproc) && \
|
make -j$(nproc) && \
|
||||||
make install
|
make install && \
|
||||||
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip && \
|
cd src/python && \
|
||||||
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 clean && \
|
||||||
make
|
PATH=/opt/protoc/bin:$PATH make && \
|
||||||
RUN /opt/core/venv/bin/python -m pip install emane/src/python
|
${VENV_PATH}/bin/python -m pip install . && \
|
||||||
|
cd /opt && \
|
||||||
|
rm -rf protoc && \
|
||||||
|
rm -rf emane && \
|
||||||
|
rm -f protoc-${PROTOC_VERSION}-linux-x86_64.zip
|
||||||
|
|
||||||
# run daemon
|
WORKDIR /root
|
||||||
CMD ["core-daemon"]
|
|
||||||
|
|
|
@ -1,62 +0,0 @@
|
||||||
# syntax=docker/dockerfile:1
|
|
||||||
FROM ubuntu:22.04
|
|
||||||
LABEL Description="CORE Docker Ubuntu Image"
|
|
||||||
|
|
||||||
ARG PREFIX=/usr/local
|
|
||||||
ARG BRANCH=master
|
|
||||||
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 -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
|
|
||||||
|
|
||||||
# install core
|
|
||||||
RUN git clone https://github.com/coreemu/core && \
|
|
||||||
cd core && \
|
|
||||||
git checkout ${BRANCH} && \
|
|
||||||
./setup.sh && \
|
|
||||||
. /root/.bashrc && \
|
|
||||||
inv install -v -p ${PREFIX} && \
|
|
||||||
cd /opt && \
|
|
||||||
rm -rf ospf-mdr
|
|
||||||
|
|
||||||
# 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
|
|
|
@ -2,45 +2,74 @@
|
||||||
FROM ubuntu:22.04
|
FROM ubuntu:22.04
|
||||||
LABEL Description="CORE Docker Ubuntu Image"
|
LABEL Description="CORE Docker Ubuntu Image"
|
||||||
|
|
||||||
# define environment
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
ARG PROTOC_VERSION=3.19.6
|
||||||
|
ARG VENV_PATH=/opt/core/venv
|
||||||
|
ENV PATH="$PATH:${VENV_PATH}/bin"
|
||||||
|
WORKDIR /opt
|
||||||
|
|
||||||
# install basic dependencies
|
# install basic dependencies
|
||||||
RUN apt-get update && apt-get install -y python3 python3-tk python3-pip python3-venv
|
RUN apt-get update -y && \
|
||||||
RUN python3 -m pip install --upgrade pip
|
apt-get install -y --no-install-recommends \
|
||||||
|
ca-certificates \
|
||||||
|
python3 \
|
||||||
|
python3-tk \
|
||||||
|
python3-pip \
|
||||||
|
python3-venv \
|
||||||
|
libpcap-dev \
|
||||||
|
libpcre3-dev \
|
||||||
|
libprotobuf-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
protobuf-compiler \
|
||||||
|
unzip \
|
||||||
|
uuid-dev \
|
||||||
|
automake \
|
||||||
|
gawk \
|
||||||
|
git \
|
||||||
|
wget \
|
||||||
|
libreadline-dev \
|
||||||
|
libtool \
|
||||||
|
pkg-config \
|
||||||
|
g++ \
|
||||||
|
make \
|
||||||
|
iputils-ping \
|
||||||
|
tcpdump && \
|
||||||
|
apt-get autoremove -y
|
||||||
|
|
||||||
# install core
|
# install core
|
||||||
WORKDIR /opt/core
|
|
||||||
COPY core_*.deb .
|
COPY core_*.deb .
|
||||||
RUN apt-get install -y ./core_*.deb
|
RUN apt-get install -y ./core_*.deb && \
|
||||||
ENV PATH "$PATH:/opt/core/venv/bin"
|
rm -f core_*.deb
|
||||||
|
|
||||||
# install ospf mdr
|
# install ospf mdr
|
||||||
RUN apt-get install -y automake gawk git libreadline-dev libtool pkg-config
|
RUN git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git && \
|
||||||
WORKDIR /opt
|
cd ospf-mdr && \
|
||||||
RUN git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git
|
|
||||||
RUN cd ospf-mdr && \
|
|
||||||
./bootstrap.sh && \
|
./bootstrap.sh && \
|
||||||
./configure --disable-doc --enable-user=root --enable-group=root \
|
./configure --disable-doc --enable-user=root --enable-group=root \
|
||||||
--with-cflags=-ggdb --sysconfdir=/usr/local/etc/quagga --enable-vtysh \
|
--with-cflags=-ggdb --sysconfdir=/usr/local/etc/quagga --enable-vtysh \
|
||||||
--localstatedir=/var/run/quagga && \
|
--localstatedir=/var/run/quagga && \
|
||||||
make -j$(nproc) && \
|
make -j$(nproc) && \
|
||||||
make install
|
make install && \
|
||||||
|
cd /opt && \
|
||||||
|
rm -rf ospf-mdr
|
||||||
|
|
||||||
# install emane
|
# install emane
|
||||||
RUN apt-get install -y libpcap-dev libpcre3-dev libprotobuf-dev libxml2-dev protobuf-compiler unzip uuid-dev
|
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
|
||||||
WORKDIR /opt
|
mkdir protoc && \
|
||||||
RUN git clone https://github.com/adjacentlink/emane.git
|
unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d protoc && \
|
||||||
RUN cd emane && \
|
git clone https://github.com/adjacentlink/emane.git && \
|
||||||
|
cd emane && \
|
||||||
./autogen.sh && \
|
./autogen.sh && \
|
||||||
./configure --prefix=/usr && \
|
./configure --prefix=/usr && \
|
||||||
make -j$(nproc) && \
|
make -j$(nproc) && \
|
||||||
make install
|
make install && \
|
||||||
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip && \
|
cd src/python && \
|
||||||
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 clean && \
|
||||||
make
|
PATH=/opt/protoc/bin:$PATH make && \
|
||||||
RUN /opt/core/venv/bin/python -m pip install emane/src/python
|
${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
|
||||||
|
|
|
@ -1,75 +0,0 @@
|
||||||
# syntax=docker/dockerfile:1
|
|
||||||
FROM ubuntu:22.04
|
|
||||||
LABEL Description="CORE Docker Ubuntu Image"
|
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
|
||||||
ARG PROTOC_VERSION=3.19.6
|
|
||||||
ARG VENV_PATH=/opt/core/venv
|
|
||||||
ENV PATH="$PATH:${VENV_PATH}/bin"
|
|
||||||
WORKDIR /opt
|
|
||||||
|
|
||||||
# install basic dependencies
|
|
||||||
RUN apt-get update -y && \
|
|
||||||
apt-get install -y --no-install-recommends \
|
|
||||||
ca-certificates \
|
|
||||||
python3 \
|
|
||||||
python3-tk \
|
|
||||||
python3-pip \
|
|
||||||
python3-venv \
|
|
||||||
libpcap-dev \
|
|
||||||
libpcre3-dev \
|
|
||||||
libprotobuf-dev \
|
|
||||||
libxml2-dev \
|
|
||||||
protobuf-compiler \
|
|
||||||
unzip \
|
|
||||||
uuid-dev \
|
|
||||||
automake \
|
|
||||||
gawk \
|
|
||||||
git \
|
|
||||||
wget \
|
|
||||||
libreadline-dev \
|
|
||||||
libtool \
|
|
||||||
pkg-config \
|
|
||||||
g++ \
|
|
||||||
make \
|
|
||||||
iputils-ping \
|
|
||||||
tcpdump && \
|
|
||||||
apt-get autoremove -y
|
|
||||||
|
|
||||||
# install core
|
|
||||||
COPY core_*.deb .
|
|
||||||
RUN apt-get install -y ./core_*.deb && \
|
|
||||||
rm -f core_*.deb
|
|
||||||
|
|
||||||
# install ospf mdr
|
|
||||||
RUN git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git && \
|
|
||||||
cd 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 /opt && \
|
|
||||||
rm -rf ospf-mdr
|
|
||||||
|
|
||||||
# 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
|
|
Loading…
Reference in a new issue