github.com/schumacherfm/hugo@v0.47.1/Dockerfile (about)

     1  # GitHub:       https://github.com/gohugoio
     2  # Twitter:      https://twitter.com/gohugoio
     3  # Website:      https://gohugo.io/
     4  
     5  FROM golang:1.10.3-alpine3.7 AS build
     6  
     7  ENV CGO_ENABLED=0
     8  ENV GOOS=linux
     9  
    10  WORKDIR /go/src/github.com/gohugoio/hugo
    11  RUN apk add --no-cache \
    12      git \
    13      musl-dev && \
    14    go get github.com/golang/dep/cmd/dep
    15  COPY . /go/src/github.com/gohugoio/hugo/
    16  RUN dep ensure -vendor-only && \
    17    go install -ldflags '-s -w'
    18  
    19  # ---
    20  
    21  FROM scratch
    22  COPY --from=build /go/bin/hugo /hugo
    23  WORKDIR /site
    24  VOLUME  /site
    25  EXPOSE  1313
    26  ENTRYPOINT [ "/hugo" ]
    27  CMD [ "--help" ]