init: Dockerfile and Makefile
This commit is contained in:
commit
07d5199d60
4 changed files with 111 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
bake/
|
23
Makefile
Normal file
23
Makefile
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
.PHONY: configure build docker-build-image all build configure clean test
|
||||||
|
|
||||||
|
DOCKER_RUN=docker run -it --mount type=bind,source="$(PWD)"/bake,target=/usr/bake ns-3-leo
|
||||||
|
|
||||||
|
all: docker-build docker-run
|
||||||
|
|
||||||
|
docker-build-image: docker/Dockerfile
|
||||||
|
cd docker && docker build -t ns-3-leo .
|
||||||
|
|
||||||
|
bake:
|
||||||
|
git clone https://gitlab.com/nsnam/bake.git
|
||||||
|
|
||||||
|
configure: docker-build-image bake
|
||||||
|
$(DOCKER_RUN) /bin/bash -c './bake.py configure -e ns-3-leo && ./bake.py check && ./bake.py download'
|
||||||
|
|
||||||
|
build: docker-build-image bake
|
||||||
|
$(DOCKER_RUN) ./bake.py build -vvv
|
||||||
|
|
||||||
|
clean: docker-build-image
|
||||||
|
$(DOCKER_RUN) ./bake.py clean
|
||||||
|
|
||||||
|
test: docker-build-image
|
||||||
|
$(DOCKER_RUN) /bin/bash -c 'cd source/ns-3-leo/ && ./test.py'
|
11
TODO.md
Normal file
11
TODO.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
2020-06-01
|
||||||
|
----------
|
||||||
|
|
||||||
|
1. ✓ read ns-3 introduction
|
||||||
|
2. ✓ figure out how to package ns-3 module using bake
|
||||||
|
3. ✓ create project for module and build chain (Docker)
|
||||||
|
|
||||||
|
2020-06-02
|
||||||
|
----------
|
||||||
|
|
||||||
|
1. workpackages -> issues and milestones on GL or git-bug
|
76
docker/Dockerfile
Normal file
76
docker/Dockerfile
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
FROM ubuntu:19.10
|
||||||
|
LABEL Description="Docker image for NS-3 Network Simulator"
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
|
||||||
|
# General dependencies
|
||||||
|
RUN apt-get install -y \
|
||||||
|
make \
|
||||||
|
git \
|
||||||
|
mercurial \
|
||||||
|
wget \
|
||||||
|
vim \
|
||||||
|
autoconf \
|
||||||
|
bzr \
|
||||||
|
cvs \
|
||||||
|
unrar \
|
||||||
|
build-essential \
|
||||||
|
clang \
|
||||||
|
valgrind \
|
||||||
|
gsl-bin \
|
||||||
|
libgsl-dev \
|
||||||
|
flex \
|
||||||
|
bison \
|
||||||
|
libfl-dev \
|
||||||
|
tcpdump \
|
||||||
|
sqlite \
|
||||||
|
sqlite3 \
|
||||||
|
libsqlite3-dev \
|
||||||
|
libxml2 \
|
||||||
|
libxml2-dev \
|
||||||
|
vtun \
|
||||||
|
unzip \
|
||||||
|
lxc
|
||||||
|
|
||||||
|
# QT components
|
||||||
|
RUN apt-get install -y \
|
||||||
|
qtbase5-dev \
|
||||||
|
qt4-dev-tools
|
||||||
|
|
||||||
|
# Python components
|
||||||
|
RUN apt-get install -y \
|
||||||
|
python \
|
||||||
|
python3 \
|
||||||
|
python-dev \
|
||||||
|
python3-dev \
|
||||||
|
python-setuptools \
|
||||||
|
python3-setuptools \
|
||||||
|
python3-requests \
|
||||||
|
python3-gi-cairo \
|
||||||
|
python-gi-cairo \
|
||||||
|
python-pygraphviz \
|
||||||
|
python3-pygraphviz \
|
||||||
|
python-gobject \
|
||||||
|
python-gobject-2 \
|
||||||
|
python3-distro \
|
||||||
|
gir1.2-gtk-3.0 \
|
||||||
|
cmake \
|
||||||
|
libc6-dev \
|
||||||
|
libc6-dev-i386 \
|
||||||
|
g++-multilib
|
||||||
|
|
||||||
|
# Setup bake env
|
||||||
|
ENV BAKE_HOME=/usr/bake
|
||||||
|
ENV PATH=$PATH:$BAKE_HOME:$BAKE_HOME/build/bin
|
||||||
|
ENV PYTHONPATH=$PYTHONPATH:$BAKE_HOME:$BAKE_HOME/build/lib
|
||||||
|
|
||||||
|
# Create working directory where bake home will be mounted
|
||||||
|
RUN mkdir $BAKE_HOME
|
||||||
|
WORKDIR /usr/bake
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
RUN apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue