Files
athens/docs/Dockerfile
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

22 lines
534 B
Docker

FROM alpine:3.8 as builder
ENV HUGO_VERSION=0.50
ENV HUGO_BINARY=hugo_${HUGO_VERSION}_Linux-64bit.tar.gz
ADD https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_BINARY} /tmp
RUN tar -xf /tmp/${HUGO_BINARY} -C /tmp
FROM alpine:3.8
COPY --from=builder /tmp/hugo /usr/local/bin/hugo
RUN apk upgrade --update \
&& apk add --no-cache git asciidoctor libc6-compat libstdc++ ca-certificates
WORKDIR /src
CMD ["hugo", "server", "-s", "/src", "-b", "http://localhost:1313", "--bind", "0.0.0.0"]
EXPOSE 1313