Docker setup for NS-3 development.
Based on the ns-3-dev | labcomu | Gitlab repository.
Current NS-3 version: 3.43.
- Make
- Docker Engine
- Docker Compose
- Visual Studio Code
- Visual Studio Code Extension: Dev Containers
- Install required packages
- Run
maketo create and enter thens3container.- If you already did it once, use
make itto enter the container again.
- If you already did it once, use
- Open on Visual Studio Code: Dev Containers: Open Attached Container Configuration File... > ns3
- Also available at
/home/$USER/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/imageConfigs/ns3.json
- Also available at
- Paste the following content:
{
"workspaceFolder": "/home/ubuntu/ns-3-dev",
"remoteUser": "ubuntu",
"extensions": [
"ms-vscode.cmake-tools",
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack",
"ms-vscode.cpptools-themes",
"twxs.cmake"
]
}- Open on Visual Studio Code: Dev Containers: Attach to Running Container... > /ns3
- Optional: setup GIT user to commit changes.
You are ready to develop and run NS-3 inside a Docker container.