# 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 software-properties-common RUN add-apt-repository "deb http://archive.ubuntu.com/ubuntu jammy universe" RUN apt-get update -y && \ apt-get install -y --no-install-recommends \ automake \ bash \ ca-certificates \ ethtool \ gawk \ gcc \ g++ \ iproute2 \ iputils-ping \ libc-dev \ libev-dev \ libreadline-dev \ libtool \ nftables \ python3 \ python3-pip \ python3-tk \ pkg-config \ tk \ xauth \ xterm \ wireshark \ vim \ build-essential \ nano \ firefox \ net-tools \ rsync \ openssh-server \ openssh-client \ vsftpd \ atftpd \ atftp \ mini-httpd \ lynx \ tcpdump \ iperf \ iperf3 \ tshark \ openssh-sftp-server \ bind9 \ bind9-utils \ openvpn \ isc-dhcp-server \ isc-dhcp-client \ whois \ ipcalc \ socat \ hping3 \ libgtk-3-0 \ librest-0.7-0 \ libgtk-3-common \ dconf-gsettings-backend \ libsoup-gnome2.4-1 \ libsoup2.4-1 \ dconf-service \ x11-xserver-utils \ ftp \ git \ sudo \ wget \ tzdata \ libpcap-dev \ libpcre3-dev \ libprotobuf-dev \ libxml2-dev \ protobuf-compiler \ unzip \ uuid-dev \ iproute2 \ vlc \ iputils-ping && \ apt-get autoremove -y # install core RUN git clone https://github.com/coreemu/core && \ cd core && \ git checkout ${BRANCH} && \ ./setup.sh && \ PATH=/root/.local/bin:$PATH 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 CMD /opt/core/venv/bin/core-daemon