Split go build in Dockerfile
authorThibault Jamet <tjamet@users.noreply.github.com>
Thu, 7 Sep 2017 13:17:44 +0000 (15:17 +0200)
committerAnthony Fok <foka@debian.org>
Mon, 25 Sep 2017 16:28:13 +0000 (10:28 -0600)
commitd9697e275ecb038958b3dcea2b43e11dcba28fc9
treee63b61afa953771a966647a6b8e96e44c7fb63eb
parent09d960f17396eb7fd2c8fe6527db9503d59f0b4f
Split go build in Dockerfile

To maximize the usage of cache, split the govendor get in steps:
- govendor fetch to get the pinned versions of dependencies
- go install to actually build the binary

Doing so allows not to re-download the whole dependencies when changing
lines in hugo repository

The current Dockerfile generates an image of 16.6MB

Signed-off-by: Thibault Jamet <tjamet@users.noreply.github.com>
Dockerfile