-
Notifications
You must be signed in to change notification settings - Fork 0
/
ns3_3.36p.dockerfile
76 lines (68 loc) · 2.25 KB
/
ns3_3.36p.dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
FROM ubuntu:jammy
LABEL mantainer="Adeel Ahmad <6880680+adeelahmadk@users.noreply.github.com>" \
description="ns-3 (3.36+) env based on ubuntu:jammy x86_64 with neovim editor" \
version="0.1" \
source="Fetched from www.nsnam.org"
ARG DEBIAN_FRONTEND=noninteractive
# update system and install
# - base system packages
# - NS-3 core dependencies
# - NS-3 python bindings
RUN ln -fs /usr/share/zoneinfo/Asia/Karachi /etc/localtime && \
apt-get update && apt-get install -y \
build-essential \
linux-headers-generic \
less nano \
tar bzip2 unzip unrar \
git curl html-xml-utils \
g++ gettext make cmake ninja-build ccache \
clang-format-14 clang-tidy-14 \
gdb valgrind \
gsl-bin libgsl-dev libgslcblas0 \
python3 python3-dev python3-pip python3-setuptools \
libboost-all-dev \
libgtk-3-dev \
libfl-dev \
libxml2 libxml2-dev \
libopenmpi-dev openmpi-bin openmpi-common openmpi-doc \
libsqlite3-dev sqlite3 \
libeigen3-dev \
qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools \
ssh tcpdump \
sqlite sqlite3 libsqlite3-dev \
doxygen graphviz imagemagick \
python3-sphinx dia imagemagick texlive dvipng latexmk \
texlive-extra-utils texlive-latex-extra texlive-font-utils \
libxml2 libxml2-dev \
libgtk-3-dev \
lxc-utils lxc-templates vtun uml-utilities ebtables bridge-utils \
gir1.2-goocanvas-2.0 python3-gi python3-gi-cairo python3-pygraphviz gir1.2-gtk-3.0 ipython3 \
&& mkdir -p /tmp/neovim && cd /tmp/neovim \
&& git clone https://github.com/neovim/neovim . \
&& git checkout stable \
&& make CMAKE_BUILD_TYPE=Release install \
&& cd - >/dev/null && rm -rf /tmp/neovim \
&& pip3 install -U pip sphinx cppyy \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# create user
RUN groupadd -g 1000 ns && \
useradd --create-home \
--shell /bin/bash \
-u 1000 \
-g ns \
ns && \
mkdir /code
# set dir
ENV CODE=/code
WORKDIR /root
# source custom env vars & build command in .bashrc
COPY ./ns3env.sh .
COPY ./get-ns.sh /opt/get-ns
COPY ./ns-build.sh /opt/ns-build
RUN cat ns3env.sh >> .bashrc && \
rm ns3env.sh && \
chown ns:ns ${CODE}
WORKDIR ${CODE}
CMD ["/bin/bash"]