CenturyLinkLabs / golang-builder

Containerized build environment for compiling an executable Golang package and packaging it in a light-weight Docker container.
Apache License 2.0
398 stars 85 forks source link

Adding OUTDIR env var, update to docker 1.9.0 #15

Closed chiefy closed 8 years ago

chiefy commented 8 years ago
odigity commented 8 years ago

I can confirm that this fixes my problem (issue 14).

dpetersen commented 8 years ago

If this defaults to writing to bin instead of the root of the source path, I think it's going to break existing users who are used to the way it works out of the box. Like my CI. :smile:

Maybe instead of OUTDIR, you can just override the whole path altogether? Then you can do whatever you want, make it bin/vault or nonconflicting-vault, etc.

odigity commented 8 years ago

testing-the-ground-with-one-toe-vault...

chiefy commented 8 years ago

@dpetersen where should we put the compiled binary? typically it would go in $GOPATH/bin right?

I should've added some docs too. Sorry.

dpetersen commented 8 years ago

@chiefy it's $GOPATH/bin when you go get something, but generally a go build will just drop the binary in the same directory you're in as far as I know. The golang-builder seems analogous to a go build.

Either way, the current implementation drops the binary in the source directory. If we change that default it's going to break any setup that depended on the current default location of the build binary. I do like the idea of being able to customize the location and name of the binary for cases where the default doesn't work, like vault.

chiefy commented 8 years ago

@dpetersen I refactored it a bit, added some docs and rebased. Your CI looks like it isn't setup right?

dpetersen commented 8 years ago

I don't know what circle's deal is. As far as I know it was never set up to run on this project at all.

So I don't have merge rights on this repository. The Labs team does not actually exist anymore, though some of us do have the ability to merge here. @bdehamer, does this look good to you? It looks good to me.

pdevanur commented 8 years ago

@dpetersen @bdehamer Can you please merge @chiefy 's changes? I am hitting the same issue while trying to create vault container.

chiefy commented 8 years ago

ping @dpetersen @bdehamer LGTM :thought_balloon: ?