@@ -4,7 +4,44 @@ Using Docker
4
4
## How to use Docker image
5
5
- Install and configure Docker for your appropriate environment, see [ Docker
6
6
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
+ ```
8
45
9
46
## Why Docker
10
47
- Full-stack (OS, python libs), reproducible, easy to distribute runtime
0 commit comments