Created
November 15, 2018 02:46
-
-
Save nekketsuuu/5fce423c1634360a8029f9eb99a6f7f9 to your computer and use it in GitHub Desktop.
Dockerfile for ns2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
# xhost +local: | |
# sudo docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix | |
# xhost -local: | |
RUN apt-get -y update \ | |
&& apt-get -y install \ | |
autoconf \ | |
automake \ | |
build-essential \ | |
libxmu-dev \ | |
wget \ | |
&& cd \ | |
&& wget --trust-server-names https://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.35/ns-allinone-2.35.tar.gz \ | |
&& tar xf ns-allinone-2.35.tar.gz \ | |
&& cd ns-allinone-2.35 \ | |
&& sed -i -e 's/erase(baseMap/this->erase(baseMap/' ns-2.35/linkstate/ls.h \ | |
&& ./install \ | |
&& cd \ | |
&& echo '\ | |
OTCL_LIB=/root/ns-allinone-2.35/otcl-1.14 \n\ | |
NS2_LIB=/root/ns-allinone-2.35/lib \n\ | |
X11_LIB=/usr/X11R6/lib \n\ | |
USR_LOCAL_LIB=/usr/local/lib \n\ | |
export LD_LIBRARY_PATH="$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB:$LD_LIBRARY_PATH" \n\ | |
TCL_LIB=/root/ns-allinone-2.35/tcl8.5.10/library \n\ | |
USR_LIB=/usr/lib \n\ | |
export TCL_LIBRARY="$TCL_LIB:$USR_LIB" \n\ | |
XGRAPH=/root/ns-allinone-2.35/bin:/root/ns-allinone-2.35/tcl8.5.10/unix:/root/ns-allinone-2.35/tk8.5.10/unix \n\ | |
NS=/root/ns-allinone-2.35/ns-2.35/ \n\ | |
NAM=/root/ns-allinone-2.35/nam-1.15/ \n\ | |
PATH="$XGRAPH:$NS:$NAM:$PATH" \n\ | |
' >> .bashrc | |
CMD /bin/bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment