2017-02-22 23:17:14 +00:00
|
|
|
FROM golang:1.8-alpine
|
2016-01-04 07:27:21 +00:00
|
|
|
|
|
|
|
ENV GOPATH /go
|
|
|
|
ENV USER root
|
|
|
|
|
2017-02-22 23:17:14 +00:00
|
|
|
RUN apk update && apk add git make
|
|
|
|
|
2016-01-04 07:27:21 +00:00
|
|
|
# pre-install known dependencies before the source, so we don't redownload them whenever the source changes
|
2017-02-22 23:17:14 +00:00
|
|
|
RUN go get github.com/kardianos/govendor \
|
|
|
|
&& govendor get github.com/spf13/hugo
|
2016-01-04 07:27:21 +00:00
|
|
|
|
2017-02-22 23:17:14 +00:00
|
|
|
COPY . $GOPATH/src/github.com/spf13/hugo
|
2016-01-04 07:27:21 +00:00
|
|
|
|
2017-02-22 23:17:14 +00:00
|
|
|
RUN cd $GOPATH/src/github.com/spf13/hugo \
|
|
|
|
&& make install test
|
2016-01-04 07:27:21 +00:00
|
|
|
|
2017-02-22 23:17:14 +00:00
|
|
|
ENTRYPOINT "/bin/sh"
|