summaryrefslogtreecommitdiffhomepage
path: root/Dockerfile
blob: 1086f4f97958771a3e4ba2a8019388319908f156 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# GitHub:       https://github.com/gohugoio
# Twitter:      https://twitter.com/gohugoio
# Website:      https://gohugo.io/

FROM golang:1.10.0-alpine3.7 AS build

ENV CGO_ENABLED=0
ENV GOOS=linux

WORKDIR /go/src/github.com/gohugoio/hugo
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'

# ---

FROM scratch
COPY --from=build /go/bin/hugo /hugo
WORKDIR /site
VOLUME  /site
EXPOSE  1313
ENTRYPOINT [ "/hugo" ]
CMD [ "--help" ]