2017-06-28 05:35:26 -04:00
|
|
|
FROM golang:alpine3.6
|
2016-01-04 02:27:21 -05:00
|
|
|
|
|
|
|
ENV GOPATH /go
|
|
|
|
|
2017-06-28 05:35:26 -04:00
|
|
|
RUN \
|
|
|
|
adduser -h /site -s /sbin/nologin -u 1000 -D hugo && \
|
2017-07-23 14:30:18 -04:00
|
|
|
apk add --no-cache \
|
|
|
|
dumb-init \
|
|
|
|
git && \
|
2017-06-28 05:35:26 -04:00
|
|
|
go get github.com/kardianos/govendor && \
|
|
|
|
govendor get github.com/gohugoio/hugo && \
|
|
|
|
cd $GOPATH/src/github.com/gohugoio/hugo && \
|
2017-07-23 14:30:18 -04:00
|
|
|
go install && \
|
|
|
|
cd $GOPATH && \
|
|
|
|
rm -rf pkg src .cache bin/govendor && \
|
|
|
|
apk del --no-cache git go
|
2016-01-04 02:27:21 -05:00
|
|
|
|
2017-07-23 14:30:18 -04:00
|
|
|
USER hugo
|
2017-06-28 05:35:26 -04:00
|
|
|
WORKDIR /site
|
2017-07-23 14:30:18 -04:00
|
|
|
VOLUME /site
|
|
|
|
EXPOSE 1313
|
2017-06-28 05:35:26 -04:00
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/bin/dumb-init", "--", "hugo"]
|
|
|
|
CMD [ "--help" ]
|
2016-01-04 02:27:21 -05:00
|
|
|
|