docs: give a working Docker example

This commit is contained in:
Ayke van Laethem
2018-10-21 22:36:46 +02:00
parent 58ce5d9bf2
commit c88d2d10a7
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ See the [installation instructions](https://tinygo.readthedocs.io/en/latest/inst
A docker container exists for easy access to the `tinygo` CLI:
```sh
$ docker run --rm -v $(pwd):/src tinygo/tinygo build -o /src/blinky.elf -target arduino /src/examples/blinky
$ docker run --rm -v $(pwd):/src tinygo/tinygo build -o /src/wasm.wasm -target wasm examples/wasm
```
Note that you cannot run `tinygo flash` from inside the docker container,
+4 -3
View File
@@ -5,10 +5,11 @@
Using with Docker
=================
A docker container exists for easy access to the ``tinygo`` CLI.
For example, to compile the blinky example from the root of the repository::
A docker container exists for easy access to the ``tinygo`` CLI. For example, to
compile ``wasm.wasm`` for the WebAssembly example, from the root of the
repository::
docker run --rm -v $(pwd):/src tinygo/tinygo build -o /src/blinky.elf -target arduino /src/examples/blinky
docker run --rm -v $(pwd):/src tinygo/tinygo build -o /src/wasm.wasm -target wasm examples/wasm
Note that you cannot run ``tinygo flash`` from inside the docker container,
so it is less useful for microcontroller development.