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-06-14 17:50:25 -04:00
|
|
|
FROM golang:1.10.3-alpine3.7 AS build
|
2018-03-18 16:54:49 -04:00
|
|
|
|
|
|
|
ENV CGO_ENABLED=0
|
|
|
|
ENV GOOS=linux
|
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 \
|
|
|
|
musl-dev && \
|
|
|
|
go get github.com/golang/dep/cmd/dep
|
|
|
|
COPY . /go/src/github.com/gohugoio/hugo/
|
|
|
|
RUN dep ensure -vendor-only && \
|
|
|
|
go install -ldflags '-s -w'
|
|
|
|
|
|
|
|
# ---
|
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" ]
|