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 && \
|
2017-07-23 18:30:18 +00:00
|
|
|
apk add --no-cache \
|
|
|
|
dumb-init \
|
|
|
|
git && \
|
2017-06-28 09:35:26 +00:00
|
|
|
go get github.com/kardianos/govendor && \
|
|
|
|
govendor get github.com/gohugoio/hugo && \
|
|
|
|
cd $GOPATH/src/github.com/gohugoio/hugo && \
|
2017-07-23 18:30:18 +00:00
|
|
|
go install && \
|
|
|
|
cd $GOPATH && \
|
|
|
|
rm -rf pkg src .cache bin/govendor && \
|
|
|
|
apk del --no-cache git go
|
2016-01-04 07:27:21 +00:00
|
|
|
|
2017-07-23 18:30:18 +00:00
|
|
|
USER hugo
|
2017-06-28 09:35:26 +00:00
|
|
|
WORKDIR /site
|
2017-07-23 18:30:18 +00:00
|
|
|
VOLUME /site
|
|
|
|
EXPOSE 1313
|
2017-06-28 09:35:26 +00:00
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/bin/dumb-init", "--", "hugo"]
|
|
|
|
CMD [ "--help" ]
|
2016-01-04 07:27:21 +00:00
|
|
|
|