Code Monkey home page Code Monkey logo

cs353-docker's Introduction

CSCI 353 Networking Docker Image


Intro

This repo setups a simple dev environment for CSCI 353 projects with Docker. After pulling the Docker image from Docker Hub, you should be able to use the run.sh or run.ps1 script to start, stop, and work in a virtualized environment all from your command line.

This repo is also based off of Cameron Durham's cs350-docker project.

Supported Platforms

This Docker image has been tested and verified to be functioning correctly on the following platforms:

  • Debian Sid, CentOS 8, Arch Linux

Please help me add more as you try them out by submitting a PR or an issue!

Recommended Editors

Getting Started

The instructions below will walk you through running the setup script and the run script you'll use to access the csci350 environment.

Set Up

  1. Install Docker desktop from the website

    • Windows Users Only: Docker provides better performance using WSL 2 than legacy Hyper-V. Set up WSL 2 using Microsoft's guide here. After you have WSL 2 running, refer to the screenshots at the end of this readme for settings you have to enable in Docker Desktop app.
    • Linux Users Only: Install Docker engine from here, and Docker Compose from here
  2. Clone this repository.

  3. Specify your desired mount location (i.e. your xv6 project folder)

Windows users only

Make sure you run this in an Admin PowerShell to let you run scripts:

# must execute this in admin powershell and select [A] to run scripts
Set-ExecutionPolicy RemoteSigned

Running

  1. Modify the work variable at the top of the run script in the project folder. For example:

    macOS/Linux:

    # in run.sh
    work=~/projects/cs353/lab1data/

    Windows Powershell:

    # in run.ps1
    $work="C:\Users\Username\cs353/lab1data"

    Windows Terminal using WSL2:

    work=/mnt/c/Users/Username/cs353/lab1data
  2. Run the run.sh/run.ps1 script. If this is your first time starting, this will pull the Docker image. This image will be cached until there's a new image available or you manually remove it.

    macOS/Linux/Windows Terminal (WSL2):

    ./run.sh start

    Windows Powershell:

    .\run.ps1 start

This script is only a wrapper for some simple Docker commands.

Working in the Environment

To start up a Linux shell inside the Docker image, you'll want to start a terminal session inside the Docker image:

macOS/Linux/Windows Terminal (WSL2):

./run.sh shell

Windows Powershell:

.\run.ps1 shell

Stopping

After you're done working in the environment, you might want to stop the container. Don't worry if you forget to do this, since Docker Desktop will automatically and safely stop running containers when you shutdown your computer.

macOS/Linux/Windows Terminal (WSL2):

./run.sh stop

Windows Powershell:

.\run.ps1 stop

System Requirements

Below are the system requirements for Docker Desktop:

Windows host:

  • Windows 10 64-bit: (Build 15063 or later)
    • Pro, Enterprise, or Education: using Hyper-V and Containers Windows features
    • Any Windows 10 version: using WSL2 container backend (recommended)

If you are using Windows 10 Home, you can obtain a "free" license for Windows 10 Education here.

Mac host:

  • Mac hardware must be a 2010 or newer model
  • macOS must be version 10.13 or newer
  • 4 GB RAM minimum

Linux host:

  • Use the Docker-provided install instructions if it exists for your distro, otherwise

cs353-docker's People

Contributors

h313 avatar

Watchers

 avatar  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.