2018-03-18 20:54:49 +00:00
|
|
|
# GitHub: https://github.com/gohugoio
|
|
|
|
# Twitter: https://twitter.com/gohugoio
|
|
|
|
# Website: https://gohugo.io/
|
2016-01-04 07:27:21 +00:00
|
|
|
|
2018-06-14 21:50:25 +00:00
|
|
|
FROM golang:1.10.3-alpine3.7 AS build
|
2018-03-18 20:54:49 +00:00
|
|
|
|
|
|
|
ENV CGO_ENABLED=0
|
|
|
|
ENV GOOS=linux
|
2017-09-07 13:17:44 +00:00
|
|
|
|
2017-09-07 13:08:56 +00:00
|
|
|
WORKDIR /go/src/github.com/gohugoio/hugo
|
2018-03-18 20:54:49 +00: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 07:27:21 +00:00
|
|
|
|
2018-03-18 20:54:49 +00:00
|
|
|
FROM scratch
|
|
|
|
COPY --from=build /go/bin/hugo /hugo
|
2017-06-28 09:35:26 +00:00
|
|
|
WORKDIR /site
|
2017-07-23 18:30:18 +00:00
|
|
|
VOLUME /site
|
|
|
|
EXPOSE 1313
|
2018-03-18 20:54:49 +00:00
|
|
|
ENTRYPOINT [ "/hugo" ]
|
2017-06-28 09:35:26 +00:00
|
|
|
CMD [ "--help" ]
|