无法弄清楚如何使用docker容器进行交叉编译

时间:2016-02-29 17:58:51

标签: go docker

我正在尝试将一些Go代码交叉编译到windows目标(基于本指南https://hub.docker.com/_/golang/):

$ docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp -e GOOS=windows -e GOARCH=386 golang:1.5 go get github.com/gorilla/websocket && go build -v
conn.go:8:2: cannot find package "github.com/gorilla/websocket" in any of:
/usr/lib/go/src/github.com/gorilla/websocket (from $GOROOT)
/home/mark/devel/gocode/src/github.com/gorilla/websocket (from $GOPATH)

我尝试编译这个:https://github.com/gorilla/websocket/tree/master/examples/chat) ...但我无法弄清楚正确的命令行:(

0 个答案:

没有答案