Sample from blog post doesn't run
Closed this issue · 4 comments
Following along with the blog post @ https://medium.com/iron-io-blog/the-easiest-way-to-develop-with-go-introducing-a-docker-based-go-tool-c456238507d6#.dkpttcms6 using this simple file: https://gist.github.com/treeder/75422a9be7b788c41c39#file-app-go
Running
docker run --rm -v $PWD:/app -w /app treeder/go vendor
Gives me this...
Vendoring dependencies...
can't load package: package x/y/z: no buildable Go source files in /go/src/x/y/z
What am I missing?
Hey @berinle , not sure what I did to break that, but the follow on project to this is here: https://github.com/treeder/devo , see the README, but it'll be a simple:
dj go vendor
Added note to top of post.
Thanks @treeder. You might want to make some tweaks to https://github.com/treeder/devo
The usage script gives this:
dj() {
docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v "$PWD":/app -v $HOME:/root:ro -w /app -p 8080:8080 devo/dj $@
}
This already occupies port 8080 on the host. Running the sample then yields this error and won't start
% dj go vendor
run --rm --name dj_7 -i --volumes-from /distracted_wozniak -p 8080:8080 -w /app iron/go sh -c chmod a+x __uberscript__ && ./__uberscript__
Error response from daemon: Cannot start container c3cbdaee414a9eb901dac9930da3e973458b373f18c79f631c5d1afb3059052e: Bind for 0.0.0.0:8080 failed: port is already allocated
I had to change the dj script and give it a less frequently used port on the host to avoid the conflicts. Things worked after that.
Hi @berinle , moved issue here: treeder/dj-old#1 . Let's continue there.