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
|
||||
LABEL Description="CORE Docker CentOS Image"
|
||||
|
||||
# define variables
|
||||
ARG PREFIX=/usr
|
||||
ARG BRANCH=master
|
||||
|
||||
# define environment
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
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 && \
|
||||
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
|
||||
WORKDIR /opt
|
||||
RUN wget https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz
|
||||
RUN tar xf Python-3.9.15.tgz
|
||||
RUN yum install -y make && yum-builddep -y python3
|
||||
RUN cd Python-3.9.15 && \
|
||||
./configure --enable-optimizations --with-ensurepip=install && \
|
||||
make -j$(nproc) altinstall
|
||||
RUN python3.9 -m pip install --upgrade pip
|
||||
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
|
||||
WORKDIR /opt
|
||||
RUN git clone https://github.com/coreemu/core
|
||||
WORKDIR /opt/core
|
||||
RUN git checkout ${BRANCH}
|
||||
RUN PYTHON=/usr/local/bin/python3.9 ./setup.sh
|
||||
RUN . /root/.bashrc && PYTHON=/usr/local/bin/python3.9 inv install -v -p ${PREFIX} --no-python
|
||||
ENV PATH "$PATH:/opt/core/venv/bin"
|
||||
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 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 && \
|
||||
tar xf emane-1.3.3-release-1.el7.x86_64.tar.gz && \
|
||||
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 -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 && \
|
||||
unzip protoc-3.19.6-linux-x86_64.zip -d protoc
|
||||
RUN git clone https://github.com/adjacentlink/emane.git
|
||||
RUN PATH=/opt/protoc/bin:$PATH && \
|
||||
cd emane && \
|
||||
git checkout v1.3.3 && \
|
||||
./autogen.sh && \
|
||||
PYTHON=/opt/core/venv/bin/python ./configure --prefix=/usr && \
|
||||
cd src/python && \
|
||||
make && \
|
||||
/opt/core/venv/bin/python -m pip install .
|
||||
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
|
||||
|
||||
# run daemon
|
||||
CMD ["core-daemon"]
|
||||
WORKDIR /root
|
||||
|
|
|
@ -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
|
||||
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 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
|
||||
WORKDIR /opt
|
||||
RUN wget https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz
|
||||
RUN tar xf Python-3.9.15.tgz
|
||||
RUN yum install -y make && yum-builddep -y python3
|
||||
RUN cd Python-3.9.15 && \
|
||||
./configure --enable-optimizations --with-ensurepip=install && \
|
||||
make -j$(nproc) altinstall
|
||||
RUN python3.9 -m pip install --upgrade pip
|
||||
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
|
||||
WORKDIR /opt/core
|
||||
COPY core_*.rpm .
|
||||
RUN PYTHON=/usr/local/bin/python3.9 yum install -y ./core_*.rpm
|
||||
ENV PATH "$PATH:/opt/core/venv/bin"
|
||||
RUN PYTHON=/usr/local/bin/python3.9 yum install -y ./core_*.rpm && \
|
||||
rm -f core_*.rpm
|
||||
|
||||
# install ospf mdr
|
||||
RUN yum install -y automake gawk git libreadline-devel libtool pkg-config
|
||||
WORKDIR /opt
|
||||
RUN git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git
|
||||
RUN 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
|
||||
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 yum install -y libpcap-devel libpcre3-devel libxml2-devel protobuf-devel unzip uuid-devel
|
||||
WORKDIR /opt
|
||||
# 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 && \
|
||||
|
@ -44,15 +68,20 @@ RUN wget -q https://adjacentlink.com/downloads/emane/emane-1.3.3-release-1.el7.x
|
|||
cd ../../../.. && \
|
||||
rm emane-1.3.3-release-1.el7.x86_64.tar.gz && \
|
||||
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 && \
|
||||
unzip protoc-3.19.6-linux-x86_64.zip -d protoc
|
||||
RUN git clone https://github.com/adjacentlink/emane.git
|
||||
RUN PATH=/opt/protoc/bin:$PATH && \
|
||||
cd emane && \
|
||||
git checkout v1.3.3 && \
|
||||
./autogen.sh && \
|
||||
PYTHON=/opt/core/venv/bin/python ./configure --prefix=/usr && \
|
||||
cd src/python && \
|
||||
make && \
|
||||
/opt/core/venv/bin/python -m pip install .
|
||||
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
|
||||
|
|
|
@ -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
|
||||
LABEL Description="CORE Docker Ubuntu Image"
|
||||
|
||||
# define variables
|
||||
ARG PREFIX=/usr/local
|
||||
ARG BRANCH=master
|
||||
|
||||
# define environment
|
||||
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 basic dependencies
|
||||
RUN apt-get update && \
|
||||
apt-get install -y git sudo wget tzdata
|
||||
# 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
|
||||
WORKDIR /opt
|
||||
RUN git clone https://github.com/coreemu/core
|
||||
WORKDIR /opt/core
|
||||
RUN git checkout ${BRANCH}
|
||||
RUN ./setup.sh
|
||||
RUN . /root/.bashrc && inv install -v -p ${PREFIX}
|
||||
ENV PATH "$PATH:/opt/core/venv/bin"
|
||||
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 apt-get install -y libpcap-dev libpcre3-dev libprotobuf-dev libxml2-dev protobuf-compiler unzip 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 wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip && \
|
||||
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-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
|
||||
RUN /opt/core/venv/bin/python -m pip install emane/src/python
|
||||
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
|
||||
|
||||
# run daemon
|
||||
CMD ["core-daemon"]
|
||||
WORKDIR /root
|
||||
|
|
|
@ -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
|
||||
LABEL Description="CORE Docker Ubuntu Image"
|
||||
|
||||
# define environment
|
||||
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 && apt-get install -y python3 python3-tk python3-pip python3-venv
|
||||
RUN python3 -m pip install --upgrade pip
|
||||
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
|
||||
WORKDIR /opt/core
|
||||
COPY core_*.deb .
|
||||
RUN apt-get install -y ./core_*.deb
|
||||
ENV PATH "$PATH:/opt/core/venv/bin"
|
||||
RUN apt-get install -y ./core_*.deb && \
|
||||
rm -f core_*.deb
|
||||
|
||||
# install ospf mdr
|
||||
RUN apt-get install -y automake gawk git libreadline-dev libtool pkg-config
|
||||
WORKDIR /opt
|
||||
RUN git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git
|
||||
RUN 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
|
||||
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 apt-get install -y libpcap-dev libpcre3-dev libprotobuf-dev libxml2-dev protobuf-compiler unzip 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 wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip && \
|
||||
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-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
|
||||
RUN /opt/core/venv/bin/python -m pip install emane/src/python
|
||||
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
|
||||
|
|
|
@ -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