{"id":17334438,"url":"https://github.com/marshallasch/ns3-container","last_synced_at":"2026-01-21T17:03:07.839Z","repository":{"id":37024272,"uuid":"445912289","full_name":"MarshallAsch/ns3-container","owner":"MarshallAsch","description":"Docker base container for the ns-3 network simulator","archived":false,"fork":false,"pushed_at":"2024-06-19T17:32:51.000Z","size":17,"stargazers_count":1,"open_issues_count":9,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T11:48:56.573Z","etag":null,"topics":["base-image","docker-image","ns3","reproducibility","simulations"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/marshallasch/ns3","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarshallAsch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-08T19:40:40.000Z","updated_at":"2024-04-25T12:22:14.000Z","dependencies_parsed_at":"2024-12-19T21:28:07.234Z","dependency_job_id":"5e2b31aa-fb67-464b-bb52-d22201dd0ecd","html_url":"https://github.com/MarshallAsch/ns3-container","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.125,"last_synced_commit":"3a640b74505992b965564358dda50817a1183551"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MarshallAsch/ns3-container","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarshallAsch%2Fns3-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarshallAsch%2Fns3-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarshallAsch%2Fns3-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarshallAsch%2Fns3-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarshallAsch","download_url":"https://codeload.github.com/MarshallAsch/ns3-container/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarshallAsch%2Fns3-container/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28636660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T15:01:31.228Z","status":"ssl_error","status_checked_at":"2026-01-21T14:42:58.942Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["base-image","docker-image","ns3","reproducibility","simulations"],"created_at":"2024-10-15T15:06:04.470Z","updated_at":"2026-01-21T17:03:07.819Z","avatar_url":"https://github.com/MarshallAsch.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Create Docker Container](https://github.com/MarshallAsch/ns3-container/actions/workflows/deploy.yaml/badge.svg)](https://github.com/MarshallAsch/ns3-container/actions/workflows/deploy.yaml)![GitHub](https://img.shields.io/github/license/marshallasch/ns3-container?style=plastic)\n![Lines of code](https://img.shields.io/tokei/lines/github/marshallasch/ns3-container?style=plastic)\n![NS3 version](https://img.shields.io/badge/NS--3-3.32-blueviolet?style=plastic)\n![NS3 version](https://img.shields.io/badge/NS--3-3.33-blueviolet?style=plastic)\n![NS3 version](https://img.shields.io/badge/NS--3-3.34-blueviolet?style=plastic)\n![NS3 version](https://img.shields.io/badge/NS--3-3.35-blueviolet?style=plastic)\n![Docker Pulls](https://img.shields.io/docker/pulls/marshallasch/ns3?style=plastic)\n\n# NS-3 Container\n\nThis will create a docker container for the [ns-3](https://www.nsnam.org/) network simulator. \nThis repository is designed to be used as a base container for simulation models, experiments and CI pipelines for ns3. \n\nThis action can be used to check your code for multiple versions of ns-3, currently this will support\n`ns-3.32`, `ns-3.33`, `ns-3.34`, and `ns-3.35`. \nIf you wish to see a different version of ns-3 supported by this action open an issue and Id be happy to add support for it. \n\n\n## Motivation\n\nThe ns-3 network simulation platform is an interesting codebase that is different from most other\nlibrary projects, where instead of including the simulator as a project dependency the simulation\ncode needs to be written _inside_ of the simulator code.\n\nWe developed Docker containers for our simulation studies so that a permanent stable artifact can be provided. \nThis base container has been developed to help provide some standardization across each of the simulations. \n\n## Building\n\nThe only dependency needed to build this is docker, and more than 2 GB of ram, I think 4GB might be needed\nor it will crash part way through. \n\n```bash\n$ docker build \\\n      --build-arg VCS_REF=$(git rev-parse -q --verify HEAD) \\\n      --build-arg BUILD_DATE=$(date -u +\"%Y-%m-%dT%H:%M:%SZ\") \\\n      --build-arg BUILD_PROFILE=debug \\\n      -t marshallasch/ns3 .\n```\n\nThat is all that is needed to build the docker container, you do not need to have the ns-3 codebase installed\nbecause it will download a fresh copy of the `ns3-allinone` version when building the container. \n\nBy default it will build NS3 version 3.32, as that is the version of the simulator that I am using for my\nresearch.\nBut a different version can be specified:\n\n```bash\n$ docker build --build-arg NS3_VERSION=3.33 marshallasch/ns3 .\n```\n\nThe build variant can be configured using the `BUILD_PROFILE` build-arg, it can be set to either `debug`, `release`, or `optimized`.\nIt is set to `debug` by default.\n\nThe only potential shortcoming of that is if there are different system dependencies needed for different\nversions of ns3, although it _should_ be fine.\n\nOne thing to note about this container is that it does not support any visualization.\n\n## Usage\n\nThis Docker image can be used in one of three ways:\n\n1. as a base image for other ns-3 projects\n2. to run ns-3 simulations directly\n3. to get a bash shell in a ns-3 installation\n\n\n### As a base image\n\nThe main purpose of this image is to be used as a base image for other containers. \nThis image will provide the base ns-3 installation and all of its dependencies. \nBelow is an example docker file showing how this base could be used:\n\n```dockerfile\nFROM marshallasch/ns3:3.32-debug\n\nCOPY . contrib/\nRUN ./waf configure --enable-examples --enable-tests --build-profile=${BUILD_PROFILE} \u0026\u0026 ./waf build\n```\n\n\n\n### Interactive bash terminal\n\nThe interactive shell will put you in the ns-3 root directory.\nDepending on which docker image tag is used ns-3 can either be built in debug mode or optimized mode.\n\n```bash\ndocker run --rm -it marshallasch/ns3:3.32-optimized bash\n```\n\n\n### To run ns-3 simulations\n\nIf anything other than `bash` is given as the command to the Docker container then the command will\nbe passed to `./waf --run \"\u003ccommand\u003e\"` to run a simulation.\n\n```bash\ndocker run --rm marshallasch/ns3:3.32-optimized first\n```\n\n## Special Thanks\n\nI would like to acknowledge Dr. Jason Ernst ([@compscidr](https://github.com/compscidr))\nwho gave me the idea to implement this pipeline stage to help validate that my simulation code\nactually builds. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarshallasch%2Fns3-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarshallasch%2Fns3-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarshallasch%2Fns3-container/lists"}