3 Commits

Author SHA1 Message Date
Nuno do Carmo
2b6bf6ca9a Changed HUGO_VERSION variable to ARG instead of ENV (#901)
this is a small change, however it will allow the creation of images based on a specific GoHugo version if needed.
The build command should be something like:
`docker build --build-arg HUGO_VERSION=0.51 -t repo/image-name .`

I tested the build as written above and it worked fine, but please feel free to test it further.
2018-11-16 09:59:06 -05:00
Nuno do Carmo
4fc6e74423 Added mutli-stage build (#869)
Added the multi-stage build in order to avoid all the `rm` commands and just copying `hugo` binary to a fresh image.
Kept the packages as I'm not sure if they're needed "in the long run".

For debugging purpose, I kept the `ENV` values, however if needed, the `builder` part could be changed to the following for "always" up to date Hugo version:
```Dockerfile
FROM alpine:3.8 as builder
RUN apk add curl wget jq
WORKDIR /tmp
RUN curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | jq -r ".assets[] | select(.name | contains(\"Linux-64bit.tar.gz\")) | .browser_download_url" | grep -v extended | wget -qi -
RUN tar -xzf hugo*.tar.gz
```
2018-11-06 16:33:42 -05:00
Chris Mills
50876fbf79 Add Dockerfile for docs (#857)
There's no official image for hugo, so lets make our own and have the
Makefile build the Dockerfile

Add some basic documentation

I've added some simple documentation and tidied up the Dockerfile. I
move the file to use best practice and reduced the size slightly.
Personally I don't think we'll need to alter the address and not watch
files as it's only going to be used for local development atm. It might
be useful in future to move to being able to alter these if we're using
this in production

Don't use docs use hugo

It would be confusing for people to docker pull the docs but not have
any docs included in them. hugo as the name would make way more sense.

Don't lock down to digest

We should trust official libs, especially the alpine build.

Signed-off-by: Chris M <millscj01@gmail.com>
2018-11-02 12:11:11 -04:00