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
@@ -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
$ for GOOS in darwin linux; do
> for GOARCH in 386 amd64; do
+> export GOOS GOARCH
> go build -v -o myapp-$GOOS-$GOARCH
> done