blob: 4d6ca2db6f9868b4a28f02edd0309cbfbacff42f (
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
28
29
30
31
32
33
|
FROM alpine:3.6
ENV GOPATH /go
ENV PATH $GOPATH/bin:$PATH
RUN \
adduser -h /site -s /sbin/nologin -u 1000 -D hugo && \
apk add --no-cache \
dumb-init && \
apk add --no-cache --virtual .build-deps \
gcc \
musl-dev \
go \
git && \
mkdir -p \
${GOPATH}/bin \
${GOPATH}/pkg \
${GOPATH}/src && \
go get github.com/kardianos/govendor && \
govendor get github.com/gohugoio/hugo && \
cd $GOPATH/src/github.com/gohugoio/hugo && \
go install && \
cd $GOPATH && \
rm -rf pkg src .cache bin/govendor && \
apk del .build-deps
USER hugo
WORKDIR /site
VOLUME /site
EXPOSE 1313
ENTRYPOINT ["/usr/bin/dumb-init", "--", "hugo"]
CMD [ "--help" ]
|