Skip to content

Commit fdfff87

Browse files
committed
Docker.md: show output of mochidocker --dockerhelp so user do not have to run it to see it
1 parent 86e26da commit fdfff87

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

Docker.md

+38-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,44 @@ Using Docker
44
## How to use Docker image
55
- Install and configure Docker for your appropriate environment, see [Docker
66
installation documentation] (https://docs.docker.com/installation)
7-
- Follow instructions in `bin/mochidocker --dockerhelp` in this checkout
7+
- Follow instructions in `bin/mochidocker --dockerhelp` in this checkout, a
8+
sample below:
9+
```sh
10+
$ bin/mochidocker --dockerhelp
11+
Usage: mochidocker [options] <any mochi interpreter arguments> ...
12+
13+
14+
Ex:
15+
16+
Run one .mochi file using relative path to the .mochi file (absolute path does not work)
17+
Note: relative forward path only. This form "../path/to/file.mochi" does not work.
18+
$ cd $MOCHI_CHECKOUT_ROOT; bin/mochidocker examples/fizzbuzz.mochi
19+
$ mochidocker relative-path/to/file.mochi
20+
21+
Explore mochi command-line
22+
$ mochidocker --help # mochi interpreter help
23+
$ mochidocker --version # mochi interpreter version
24+
25+
Enter mochi interractive interpreter
26+
$ mochidocker
27+
28+
Run all examples
29+
$ cd $MOCHI_CHECKOUT_ROOT; for f in examples/*.mochi; do echo $f; bin/mochidocker $f; done
30+
31+
Use an alternate docker image
32+
$ mochidocker --dockerimg tlvu/mochi:<version tag> --version
33+
$ cd $MOCHI_CHECKOUT_ROOT; bin/mochidocker --dockerimg tlvu/mochi:0.2.1 workdir/examples/fizzbuzz.mochi
34+
35+
As a developer, run the latest code in this checkout (not the code in the docker image)
36+
Note: $MOCHI_CHECKOUT_ROOT must not contain space for this to work
37+
$ cd $MOCHI_CHECKOUT_ROOT; bin/mochidocker --dockerdevel examples/fizzbuzz.mochi
38+
39+
40+
Options:
41+
--dockerimg img Alternate image name, default: tlvu/mochi
42+
--dockerdevel Use latest code in the current checkout
43+
--dockerhelp Show this help
44+
```
845

946
## Why Docker
1047
- Full-stack (OS, python libs), reproducible, easy to distribute runtime

0 commit comments

Comments
 (0)