mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 19:17:47 +00:00
Dockerfile, README, docs: Remove entrypoint
This was causing more trouble than it was helping, so lets remove it.
This commit is contained in:
committed by
Ayke van Laethem
parent
cb648d8ae1
commit
a830451426
+1
-2
@@ -14,8 +14,6 @@ RUN cd /go/src/github.com/aykevl/tinygo/ && \
|
||||
dep ensure --vendor-only && \
|
||||
go install /go/src/github.com/aykevl/tinygo/
|
||||
|
||||
ENTRYPOINT ["/go/bin/tinygo"]
|
||||
|
||||
# tinygo-wasm stage installs the needed dependencies to compile TinyGo programs for WASM.
|
||||
FROM tinygo-base AS tinygo-wasm
|
||||
|
||||
@@ -79,3 +77,4 @@ RUN cd /go/src/github.com/aykevl/tinygo/ && \
|
||||
apt-get autoremove -y && \
|
||||
apt-get clean
|
||||
|
||||
CMD ["tinygo"]
|
||||
|
||||
@@ -76,7 +76,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/wasm.wasm -target wasm examples/wasm
|
||||
$ docker run --rm -v $(pwd):/src tinygo/tinygo tinygo build -o /src/wasm.wasm -target wasm examples/wasm
|
||||
```
|
||||
|
||||
Note that you cannot run `tinygo flash` from inside the docker container,
|
||||
|
||||
+7
-7
@@ -9,25 +9,25 @@ 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/wasm.wasm -target wasm examples/wasm
|
||||
docker run --rm -v $(pwd):/src tinygo/tinygo tinygo build -o /src/wasm.wasm -target wasm examples/wasm
|
||||
|
||||
To compile ``blinky1.hex`` targeting an ARM microcontroller, such as the PCA10040::
|
||||
|
||||
docker run --rm -v $(pwd):/src tinygo/tinygo build -o /src/blinky1.hex -size=short -target=pca10040 examples/blinky1
|
||||
docker run --rm -v $(pwd):/src tinygo/tinygo tinygo build -o /src/blinky1.hex -size=short -target=pca10040 examples/blinky1
|
||||
|
||||
To compile ``blinky1.hex`` targeting an AVR microcontroller such as the Arduino::
|
||||
|
||||
docker run --rm -v $(pwd):/src tinygo/tinygo build -o /src/blinky1.hex -size=short -target=arduino examples/blinky1
|
||||
docker run --rm -v $(pwd):/src tinygo/tinygo tinygo build -o /src/blinky1.hex -size=short -target=arduino examples/blinky1
|
||||
|
||||
For projects that have remote dependencies outside of the standard library and go code within your own project, you will need to map your entire GOPATH into the docker image in order for those dependencies to be found::
|
||||
|
||||
docker run -v $(PWD):/mysrc -v $GOPATH:/gohost -e "GOPATH=$GOPATH:/gohost" tinygo/tinygo build -o /mysrc/wasmout.wasm -target wasm /mysrc/wasm-main.go
|
||||
docker run -v $(PWD):/mysrc -v $GOPATH:/gohost -e "GOPATH=$GOPATH:/gohost" tinygo/tinygo tinygo build -o /mysrc/wasmout.wasm -target wasm /mysrc/wasm-main.go
|
||||
|
||||
.. note::
|
||||
At this time, tinygo does not resolve dependencies from the /vendor/ folder within your project.
|
||||
At this time, tinygo does not resolve dependencies from the /vendor/ folder within your project.
|
||||
|
||||
For microcontroller development you must flash your hardware devices
|
||||
from your host environment, since you cannot run ``tinygo flash`` from inside
|
||||
For microcontroller development you must flash your hardware devices
|
||||
from your host environment, since you cannot run ``tinygo flash`` from inside
|
||||
the docker container.
|
||||
|
||||
So your workflow could be:
|
||||
|
||||
Reference in New Issue
Block a user