FIX: Cross-compile
Cross-compile your app inside the Docker container I do that, found it not worked right, then i do this ,it's ok! fix GOOS GOARCH fix GOOS GOARCH
This commit is contained in:
parent
e1803d78a0
commit
dc0d9fc5d7
|
|
@ -59,6 +59,7 @@ Alternatively, you can build for multiple platforms at once:
|
||||||
$ docker run --rm -it -v "$PWD":/usr/src/myapp -w /usr/src/myapp %%IMAGE%%:1.8 bash
|
$ docker run --rm -it -v "$PWD":/usr/src/myapp -w /usr/src/myapp %%IMAGE%%:1.8 bash
|
||||||
$ for GOOS in darwin linux; do
|
$ for GOOS in darwin linux; do
|
||||||
> for GOARCH in 386 amd64; do
|
> for GOARCH in 386 amd64; do
|
||||||
|
> export GOOS GOARCH
|
||||||
> go build -v -o myapp-$GOOS-$GOARCH
|
> go build -v -o myapp-$GOOS-$GOARCH
|
||||||
> done
|
> done
|
||||||
> done
|
> done
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue