Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Running container fails on GOPATH \w multiple dirs entries #84

Closed
bzz opened this issue Apr 18, 2017 · 4 comments · Fixed by #140
Closed

Running container fails on GOPATH \w multiple dirs entries #84

bzz opened this issue Apr 18, 2017 · 4 comments · Fixed by #140
Assignees
Labels

Comments

@bzz
Copy link
Contributor

bzz commented Apr 18, 2017

Default GOPATH on GCE cloud console is "/home/alex/gopath:/google/gopath"

But running a build docker container for any driver fails on mounting such GOPATH

+ docker run --rm -t -u bblfsh:1000 -v /home/alex/java-driver:/opt/driver/src/ -v /home/alex/gopath:/google/gopath:/go -e ENVIRONMENT=bblfs
h/java-driver-build-with-go bblfsh/java-driver-build-with-go make test-driver-internal

docker: Error response from daemon: Invalid bind mount spec "/home/alex/gopath:/google/gopath:/go": invalid mode: /go.
See 'docker run --help'.
@bzz
Copy link
Contributor Author

bzz commented Jun 28, 2017

This also breaks the driver builds i.e in case of python,

docker: Error response from daemon: Invalid bind mount spec "/home/alex/gopath:/google/gopath:/go": invalid mode: /go.
See 'docker run --help'.
/home/alex/gopath/src/github.com/bblfsh/python-driver/.sdk/make/rules.mk:101: recipe for target 'build-driver' failed
make: *** [build-driver] Error 125

@abeaumont
Copy link
Contributor

According to https://github.com/golang/go/wiki/GOPATH, it may effectively be a list of paths even if usually not needed, so marking this as a bug.

@abeaumont abeaumont added the bug label Jun 28, 2017
@abeaumont abeaumont self-assigned this Jun 28, 2017
@abeaumont
Copy link
Contributor

The obvious solution is to parse GOPATH and just extract one of the paths in case there's more than one. The question is which one to extract, since it seems rather arbitrary. Maybe we should just use the first one and document it.

Any better ideas?

@juanjux
Copy link
Contributor

juanjux commented Jun 28, 2017

@bzz does it work in that environment if you use a single GOPATH?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants