Skip to content

Docker Container files for use in CIS 5530 projects

Notifications You must be signed in to change notification settings

CIS-5530/DockerEnv

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Docker-env

Usage

General

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.

Preparations

  1. Install Docker Desktop (version 3.0+). For Windows, we recommend setting up WSL2.
  2. Download the files from this repository
  3. Copy Dockerfile and docker-compose.yml to your course projects folder.

First-time Setup

  1. Run docker-compose build cis5530 to compile the docker image locally. This will take a few minutes.
  2. 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 the docker-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.

Note to M1 Mac users

In some cases, the docker-compose build cis5530 command will throw an error. This can be fixed by either:

  1. running docker compose build cis5530 (no '-' between docker and compose) or
  2. 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/

All Future Log-ins

Just open your course projects folder, and run docker-compose run --rm cis5530.

Multiple Sessions

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.

About docker-compose

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.

Resources

About

Docker Container files for use in CIS 5530 projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 100.0%