[go-nuts] Re: Go install speedup within docker

2017-06-12 Thread James Pettyjohn
Hi Vlad, I am using go install and the pkg directory is being mapped into the container. docker run -ti --rm \ -v "$PWD":/usr/src/pjt \ # Mount the entire project to this directory -w /usr/src/pjt \ # use the project dir as the cwd -e "GOPATH=/usr/src/pjt" \ # set the GOPATH the base of the p

[go-nuts] Re: Go install speedup within docker

2017-06-12 Thread Vladimir Varankin
"-pkgdir" flag of "go build" / "go install" could also be useful, although I haven't tried it. On Monday, June 12, 2017 at 1:06:49 PM UTC+3, Vladimir Varankin wrote: > > I think the difference is that I use my project root as my GOPATH, so pkg > directory ($GOPATH/pkg), which stores the build ca

[go-nuts] Re: Go install speedup within docker

2017-06-12 Thread Vladimir Varankin
I think the difference is that I use my project root as my GOPATH, so pkg directory ($GOPATH/pkg), which stores the build cache, is mounted inside the container every time I run the build. What if you try ``` docker container run --rm -v $PWD:/usr/src/prj -v $PWD/_build:/usr/pkg ... ``` Doing s

[go-nuts] Re: Go install speedup within docker

2017-06-11 Thread James Pettyjohn
Hey Vlad, Here's the docker command: docker run -ti --rm \ -v "$PWD":/usr/src/pjt \ -w /usr/src/pjt \ -e "GOPATH=/usr/src/pjt" -e "STATICBUILD=1" \ -e "PREBUILD_DEPS=$PREBUILD_DEPS" \ gobuilder:1.8-alpine \ ./build.sh Regarding my docker: docker-machine version 0.10.0, build 76ed2a6 Client: