install: updated dockerfiles for installing using the script based method for centos/ubuntu
This commit is contained in:
parent
7067b54a00
commit
f43e8f7646
3 changed files with 51 additions and 63 deletions
|
@ -10,17 +10,32 @@ ARG BRANCH=master
|
|||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV LANG en_US.UTF-8
|
||||
|
||||
# install core
|
||||
# install basic dependencies
|
||||
RUN yum -y update && \
|
||||
yum install -y git sudo wget tzdata unzip python3
|
||||
WORKDIR /root
|
||||
yum install -y git sudo wget tzdata unzip
|
||||
|
||||
# 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
|
||||
|
||||
# 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 && python3 -m pip install --upgrade pip
|
||||
RUN . /root/.bashrc && inv install -v -p ${PREFIX}
|
||||
# install emane packages and python bindings
|
||||
WORKDIR /root
|
||||
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"
|
||||
|
||||
# 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 && \
|
||||
|
@ -32,8 +47,15 @@ RUN wget -q https://adjacentlink.com/downloads/emane/emane-1.3.3-release-1.el7.x
|
|||
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protoc-3.7.1-linux-x86_64.zip && \
|
||||
mkdir protoc && \
|
||||
unzip protoc-3.7.1-linux-x86_64.zip -d protoc
|
||||
WORKDIR /root/core
|
||||
RUN . /root/.bashrc && PATH=/root/protoc/bin:$PATH inv install-emane -v -e v1.3.3
|
||||
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 .
|
||||
|
||||
# run daemon
|
||||
CMD ["core-daemon"]
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
FROM oraclelinux:8
|
||||
LABEL Description="CORE Docker Oracle Linux Image"
|
||||
|
||||
# define variables
|
||||
ARG PREFIX=/usr
|
||||
ARG BRANCH=master
|
||||
|
||||
# define environment
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV LANG en_US.UTF-8
|
||||
|
||||
# install core
|
||||
RUN yum -y update && \
|
||||
yum install -y git sudo wget tzdata unzip python39 which iproute-tc hostname xterm
|
||||
WORKDIR /root
|
||||
RUN git clone https://github.com/coreemu/core
|
||||
WORKDIR /root/core
|
||||
RUN git checkout ${BRANCH}
|
||||
RUN PYTHON=python3.9 PYTHON_DEP=python39 ./setup.sh
|
||||
RUN . /root/.bashrc && PYTHON=python3.9 PYTHON_DEP=python39 inv install -v -p ${PREFIX}
|
||||
# install emane packages and python bindings
|
||||
WORKDIR /root
|
||||
RUN yum config-manager --set-enabled ol8_codeready_builder && yum install -y protobuf-devel
|
||||
RUN wget -q https://adjacentlink.com/downloads/emane/emane-1.3.3-release-1.el8.x86_64.tar.gz && \
|
||||
tar xf emane-1.3.3-release-1.el8.x86_64.tar.gz && \
|
||||
cd emane-1.3.3-release-1/rpms/el8/x86_64 && \
|
||||
yum install -y epel-release && \
|
||||
yum install -y ./openstatistic*.rpm ./emane*.rpm ./python3-emane-1.3.3*.rpm && \
|
||||
cd ../../../.. && \
|
||||
rm emane-1.3.3-release-1.el8.x86_64.tar.gz && \
|
||||
rm -rf emane-1.3.3-release-1
|
||||
WORKDIR /root/core
|
||||
RUN . /root/.bashrc && PYTHON=python3.9 PATH=/root/protoc/bin:$PATH inv install-emane -v -e v1.3.3
|
||||
|
||||
# run daemon
|
||||
CMD ["core-daemon"]
|
|
@ -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"]
|
||||
|
|
Loading…
Reference in a new issue