core-extra/dockerfiles/Dockerfile.centos

39 lines
1.3 KiB
Docker

# syntax=docker/dockerfile:1
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
# install core
RUN yum -y update && \
yum install -y git sudo wget tzdata unzip python3
WORKDIR /root
RUN git clone https://github.com/coreemu/core
WORKDIR /root/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 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
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 daemon
CMD ["core-daemon"]