Skip to content

Conversation

srid
Copy link

@srid srid commented Sep 12, 2014

go build puts the binary in current source directory. only go install installs to GOBIN (/go/bin/app)

`go build` puts the binary in current source directory. only `go install` installs to GOBIN (`/go/bin/app`)
@tianon
Copy link
Member

tianon commented Sep 12, 2014

What if we just swapped go build out for go install? It seems like stuff might break, but I'm not sure what, so I'm +1 on this fix (assuming we apply it to all of the onbuild images, since they'll all have that same issue).

@srid
Copy link
Author

srid commented Sep 12, 2014

go install is obviously better. perhaps we can do that for the next release (1.4)? btw - i noticed that individual Go versions have their own dockerfile. i.e., to say my changes won't be applied on 1.3.1.

won't docker get parametrized builds?

@yosifkit
Copy link
Member

There are currently not parameterized builds and I doubt solomon wants them.

I am all for changing to go install for all the versions, since they are obviously not going to work running their current CMD.

@proppy
Copy link

proppy commented Sep 13, 2014

What about using go get that way it would also fetch the remote deps?

See https://github.com/GoogleCloudPlatform/golang-docker/blob/2fb478565611c5dcd09a29ce355bb5b013a9d7bd/runtime/go-build#L11

@tianon
Copy link
Member

tianon commented Sep 15, 2014

Oh interesting @proppy, excellent idea. Then go get will imply go install. Brilliant. I'll work up a quick PR for that right now.

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

Successfully merging this pull request may close these issues.

4 participants