Dockerfile: Switch to mage builds, various optimizations
authorJake Jarvis <jake@jarv.is>
Wed, 9 Oct 2019 15:27:08 +0000 (11:27 -0400)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 31 Oct 2019 08:53:49 +0000 (09:53 +0100)
commited2682325aeb8fd1c8139077d14a5f6906757a4e
tree80e778a02444522db376b5110812d87c35bea8ab
parent66fe68ffc98974936e157b18cf6bd9266ee081a4
Dockerfile: Switch to mage builds, various optimizations

- Use Alpine for both stages for consistency.
- Switch to mage from go install as dictated in the latest docs.
- Easy switch to building Hugo Extended by directly setting HUGO_BUILD_TAGS flag at image build time: `docker build --build-arg HUGO_BUILD_TAGS=extended .`
- Update to Go 1.13 and Alpine 3.10.
- The only possibly breaking change: Moved the `hugo` binary in the final stage from /hugo to /usr/bin/hugo so one can simply run `hugo` without having to search around for its location.
Dockerfile