Skip to content

Lawsonty/os1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Description

This is a simple Docker image intended to be used for local development of Linux programming homework assignments that typically run on a Centos server.

Instructions

  1. Install Docker.
  2. Open a terminal.
  3. Navigate to your local assignment workspace: cd ~/cs344/
  4. Create and run a container from the image: docker run --rm -it -v "$(pwd):/workspace" -w "/workspace" --name os1 nathanperkins/os1
  5. Stop container with exit

Example

# navigate to your workspace and create the container
$ cd ~/git/osu-cs344/
$ docker run --rm -it -v "$(pwd):/workspace" -w "/workspace" nathanperkins/os1

# you are now inside the container and your workspace should be here as well
[root@2d51aa00977b workspace]# ls
README.md  Vagrantfile  assignment_1  assignment_2  assignment_3  assignment_4  assignment_py  playground  test

# exit the container
[root@2d51aa00977b assignment_2]# exit
exit

Explanation

Let's break down this command

$ docker run --rm -it -v "$(pwd):/workspace" -w "/workspace" --name os1 nathanperkins/os1
  • docker run - creates and starts a new container from an image.
  • -it - runs the container in interactive mode and attaches a terminal.
  • -v "$(pwd):/workspace" - uses docker volumes to map the current local directory to a directory inside the container. This allows you to use your local files inside the container and have the changes synced both ways.
  • --rm - deletes the container itself and any anonymous volumes when done. This does not affect your workspace volume that was explicitly mapped above.
  • -w "/workspace" - opens the container /workspace as the current working directory.
  • nathanperkins/os1 - the name of the image on Docker Hub, found here

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 100.0%