Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
camerondurham authored Nov 21, 2021
1 parent 16a2321 commit 4ad6a1f
Showing 1 changed file with 35 additions and 32 deletions.
67 changes: 35 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,28 +117,44 @@ to wherever your homework is on your machine.

This environment is based on this repository: [csci104/docker](https://github.com/csci104/docker)

```shell
# create the environment
ch create csci104 --image usccsci104/docker:20.04 --volume csci104-work:/work --security-opt seccomp:unconfined --cap-add SYS_PTRACE --shell /bin/bash

# autostart and open a shell into the container
ch shell csci104 --force-start
```

1. use `ch create` to create and save the environment settings
```bash
ch create csci104 \
--image usccsci104/docker:20.04 \
--volume csci104-work:/work \
--security-opt seccomp:unconfined \
--cap-add SYS_PTRACE \
--shell /bin/bash
```
1. start the environment with a terminal session
```bash
ch shell csci104 --force-start
```

#### Create the CSCI 350 Environment

Where `csci350-work` is your homework folder in the current directory. Alternatively, you can provide the absolute path
The commands here assume `csci350-work` is your homework folder in the current directory. Alternatively, you can provide the absolute path
to wherever your homework is on your machine. For Windows, your volume command should look like `--volume "C:\Users\user\path\to\csci350:/work"`, on macOS your command should look like `--volume /Users/username/path/to/csci350:/work`.

This environment is based on the this repository: [camerondurham/cs350-docker](https://github.com/camerondurham/cs350-docker)

```shell
# create the environment
ch create csci350 --image camerondurham/cs350-docker:latest --volume csci350-work:/xv6_docker --security-opt seccomp:unconfined --port 7776:22 --port 7777:7777 --port 25000:25000 --cap-add SYS_PTRACE --shell /bin/bash --privileged

# autostart and open a shell into the container
ch shell csci350 --force-start
```
1. use `ch create` to create and save the environment settings
```bash
ch create csci350 \
--image camerondurham/cs350-docker:latest \
--volume csci350-work:/xv6_docker \
--security-opt seccomp:unconfined \
--port 7776:22 \
--port 7777:7777 \
--port 25000:25000 \
--cap-add SYS_PTRACE \
--shell /bin/bash \
--privileged
```
1. start the environment with a terminal session
```bash
ch shell csci350 --force-start
```

## What is this?

Expand Down Expand Up @@ -181,10 +197,7 @@ start docker container in background and save container id to config file
```txt
Usage:
ch start ENVIRONMENT_NAME [flags]
Flags:
-h, --help help for start
-v, --version version for start
ch start ENVIRONMENT_NAME
```
### `ch shell`
Expand All @@ -197,8 +210,6 @@ Usage:
Flags:
-f, --force-start autostart the environment if not running
-h, --help help for shell
-v, --version version for shell
```
### `ch stop`
Expand All @@ -207,11 +218,7 @@ stop running container/environment
```txt
Usage:
ch stop ENVIRONMENT_NAME [flags]
Flags:
-h, --help help for stop
-v, --version version for stop
ch stop ENVIRONMENT_NAME
```
### `ch list`
Expand All @@ -220,11 +227,7 @@ list all saved configs
```txt
Usage:
ch list [ENVIRONMENT_NAME] [flags]
Flags:
-h, --help help for list
-v, --version version for list
ch list [ENVIRONMENT_NAME]
```
### `ch running`
Expand Down

0 comments on commit 4ad6a1f

Please sign in to comment.