This Docker container is provided to students for use in developing their CIS 5530 projects (NS-3 simulations). It contains the necessary environment and applications required to compile and run the code.
- Install Docker Desktop (version 3.0+). For Windows, we recommend setting up WSL2.
- Download the files from this repository
- Copy
Dockerfile
anddocker-compose.yml
to your course projects folder.
- Run
docker-compose build cis5530
to compile the docker image locally. This will take a few minutes. - Run
docker-compose run --rm cis5530
to launch a Docker Container.
--rm
will clean up the container when it is finished.- The home directory
/home/cis5530
, also known as~
, is synchronized with the folder, where you put thedocker-compose.yml
, in your Host System.
You should now be inside your docker image, with current folder at /home/cis5530
. You can use pwd
to check.
You will log into the container as user cis5530
with password cis5530
. The password is used just in case you occasionally need sudo privilege.
Files in your project directory will be accessible from both your host OS and from within the Docker container. This will allow you to edit the files using an IDE (such as VS Code) on your host OS and run / compile your project from within the Docker container.
In some cases, the docker-compose build cis5530
command will throw an error. This can be fixed by either:
- running
docker compose build cis5530
(no '-' between docker and compose) or - In the Docker Desktop General Preferences, select
Use Docker Compose V2
More information can be found at: https://docs.docker.com/desktop/mac/apple-silicon/
Just open your course projects folder, and run docker-compose run --rm cis5530
.
To establish multiple sessions to the same
container, call docker exec -it [container_id] bash
after booting the first window with docker-compose run cis5530
. You can get the container_id
by running docker ps
in the new terminal window. Note that if you exit the container in the original terminal, all other sessions will be terminated.
The following is the official definition of docker-compose:
Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration.
In CIS 5530, we only use docker-compose
to start one service which is your simulation. But docker-compose
makes the command concise and convenient because we can predefine the configuration in docker-compose.yml
.