"-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 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 so, should keep pkg caches between builds. Not sure if it still > valid, but you might consider to switch `go install` (see > https://dave.cheney.net/2014/06/04/what-does-go-build-build) > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.