A simple docker image for ns3 (network simulator).
First of all you have to pull the image from the repository:
docker pull ghcr.io/herbrant/ns3-docker:main
Then you can run the first example:
docker run -t ns3-docker first
Also you can run your code by binding a volume on the scratch folder
docker run -t -v <your-code-path>:/ns3/ns-3.38/scratch/<example-project> ghcr.io/herbrant/ns3-docker:main <project-name>
Also you can write a Dockerfile for your project using this docker image. For instance:
FROM ghcr.io/herbrant/ns3-docker:main
RUN mkdir -p /ns3/ns-3.38/scratch/<your-project>
COPY . /ns3/ns-3.38/scratch/<your-project>
ENTRYPOINT [ "/ns3/ns-3.38/ns3", "run", "<your-project-image>" ]