Giter Site home page Giter Site logo

dockerenv's Introduction

Docker-env

Usage

General

This Docker container is provided to students for use in developing their CIS 553 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 cis553 to compile the docker image locally. This will take a few minutes.
  2. Run docker-compose run --rm cis553 to launch a Docker Container.
  • --rm will clean up the container when it is finished.
  • The home directory /home/cis553, 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/cis553. You can use pwd to check.

You will log into the container as user cis553 with password mcit. The password is used just in case you occationally need sudo previlege.

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 cis553 command will throw an error. This can be fixed by either:

  1. running docker compose build cis553 (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 cis553.

Multiple Sessions

To establish multiple sesssion to the same container, call docker exec -it [container_id] bash after booting the first window with docker-compose run cis553. 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 offical 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 553, we only use docker-compose to start one service which is your virtual machine. But docker-compose make the command consice and convient because we can predefine the configuration in docker-compose.yml.

Resources

dockerenv's People

Contributors

dianehoffstetterupenn avatar liz2020 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.