From da2218625a13dd768d5f8db4bc06147063e60abf Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 20 May 2020 19:19:53 -0700 Subject: [PATCH] Update hugo to latest version. Clean up dockerfiles. --- Dockerfile.dev | 11 ++++++----- Dockerfile.prod | 12 ++++++------ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Dockerfile.dev b/Dockerfile.dev index 64308a7..c04de83 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,11 +1,12 @@ -FROM golang:alpine +FROM alpine:latest # This should be mounted with docker run command WORKDIR /src -# Build and run hugo -ENV GO111MODULE=on -RUN go get -u github.com/gohugoio/hugo@v0.69.0 +# Get hugo -- using the edge branch to get latest version +RUN sed -i -e 's/v[[:digit:]]\..*\//edge\//g' /etc/apk/repositories +RUN apk update && apk upgrade && \ + apk add --no-cache hugo=0.71.0-r0 # Run the development server -ENTRYPOINT cd /src && hugo server --bind 0.0.0.0 +ENTRYPOINT hugo server --bind 0.0.0.0 diff --git a/Dockerfile.prod b/Dockerfile.prod index 35c832d..cba9459 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -1,18 +1,18 @@ # STEP 1: Build the website's files -FROM golang:alpine AS build-website +FROM alpine:latest AS build-website WORKDIR /src COPY . /src/ -RUN cd /src - -ENV GO111MODULE=on -RUN go get -u github.com/gohugoio/hugo@v0.69.0 +# Get hugo -- using the edge branch to get latest version +RUN sed -i -e 's/v[[:digit:]]\..*\//edge\//g' /etc/apk/repositories +RUN apk update && apk upgrade && \ + apk add --no-cache hugo=0.71.0-r0 RUN hugo --minify -# STEP 2: Get a binary for the static-web-server +# STEP 2: Build the static-web-server FROM golang:alpine AS build-webserver RUN apk update && apk upgrade && \