Fix Docker build
authorRyan Skoblenick <ryan@skoblenick.com>
Wed, 31 Jan 2018 06:33:03 +0000 (01:33 -0500)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 31 Jan 2018 08:16:28 +0000 (09:16 +0100)
The present Dockerfile in master does not build a Hugo container. The
build container prematurely exits because `dep ensure` can not locate
`Gopkg.toml` due to the source files not being copied/added to the
container prior to running this command. The minimal change require
to resolve the issue is merely move the ADD source before the RUN dep.

Fixes #4076
Resolves #4077

Dockerfile

index 889584b616be422a57456764a4afc90c4927dfb5..14834dcc2896690978fd527d6d32639126830509 100644 (file)
@@ -4,8 +4,8 @@ RUN apk add --no-cache --virtual git musl-dev
 RUN go get github.com/golang/dep/cmd/dep
 
 WORKDIR /go/src/github.com/gohugoio/hugo
-RUN dep ensure
 ADD . /go/src/github.com/gohugoio/hugo/
+RUN dep ensure
 RUN go install -ldflags '-s -w'
 
 FROM alpine:3.6