2017-09-07 09:08:56 -04:00
|
|
|
FROM golang:1.9.0-alpine3.6 AS build
|
2016-01-04 02:27:21 -05:00
|
|
|
|
2017-09-07 09:08:56 -04:00
|
|
|
RUN apk add --no-cache --virtual git musl-dev
|
|
|
|
RUN go get github.com/kardianos/govendor
|
|
|
|
RUN govendor get github.com/gohugoio/hugo
|
|
|
|
WORKDIR /go/src/github.com/gohugoio/hugo
|
|
|
|
RUN rm -f $GOPATH/bin/hugo
|
|
|
|
RUN go install -ldflags '-s -w'
|
2016-01-04 02:27:21 -05:00
|
|
|
|
2017-09-07 09:08:56 -04:00
|
|
|
FROM alpine:3.6
|
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 \
|
2017-09-07 09:08:56 -04:00
|
|
|
dumb-init
|
|
|
|
COPY --from=build /go/bin/hugo /bin/hugo
|
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" ]
|