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