2018-03-18 16:54:49 -04:00
|
|
|
# GitHub: https://github.com/gohugoio
|
|
|
|
# Twitter: https://twitter.com/gohugoio
|
|
|
|
# Website: https://gohugo.io/
|
2016-01-04 02:27:21 -05:00
|
|
|
|
2018-08-31 03:05:52 -04:00
|
|
|
FROM golang:1.11-alpine3.7 AS build
|
2018-03-18 16:54:49 -04:00
|
|
|
|
|
|
|
ENV CGO_ENABLED=0
|
|
|
|
ENV GOOS=linux
|
2018-08-31 03:05:52 -04:00
|
|
|
ENV GO111MODULE=on
|
2017-09-07 09:17:44 -04:00
|
|
|
|
2017-09-07 09:08:56 -04:00
|
|
|
WORKDIR /go/src/github.com/gohugoio/hugo
|
2018-03-18 16:54:49 -04:00
|
|
|
RUN apk add --no-cache \
|
|
|
|
git \
|
2018-08-31 03:05:52 -04:00
|
|
|
musl-dev
|
2018-03-18 16:54:49 -04:00
|
|
|
COPY . /go/src/github.com/gohugoio/hugo/
|
2018-08-31 03:05:52 -04:00
|
|
|
RUN go install -ldflags '-s -w'
|
2018-03-18 16:54:49 -04:00
|
|
|
|
|
|
|
# ---
|
2016-01-04 02:27:21 -05:00
|
|
|
|
2018-03-18 16:54:49 -04:00
|
|
|
FROM scratch
|
|
|
|
COPY --from=build /go/bin/hugo /hugo
|
2017-06-28 05:35:26 -04:00
|
|
|
WORKDIR /site
|
2017-07-23 14:30:18 -04:00
|
|
|
VOLUME /site
|
|
|
|
EXPOSE 1313
|
2018-03-18 16:54:49 -04:00
|
|
|
ENTRYPOINT [ "/hugo" ]
|
2017-06-28 05:35:26 -04:00
|
|
|
CMD [ "--help" ]
|