File tree 2 files changed +17
-10
lines changed
2 files changed +17
-10
lines changed Original file line number Diff line number Diff line change 6
6
.circleci
7
7
docs
8
8
examples
9
+ Dockerfile
Original file line number Diff line number Diff line change 2
2
# Twitter: https://twitter.com/gohugoio
3
3
# Website: https://gohugo.io/
4
4
5
- FROM golang:1.11-alpine3.7 AS build
5
+ FROM golang:1.11-stretch AS build
6
6
7
- ENV CGO_ENABLED=0
8
- ENV GOOS=linux
9
- ENV GO111MODULE=on
10
7
11
8
WORKDIR /go/src/github.com/gohugoio/hugo
12
- RUN apk add --no-cache \
13
- git \
14
- musl-dev
9
+ RUN apt-get install \
10
+ git gcc g++ binutils
15
11
COPY . /go/src/github.com/gohugoio/hugo/
16
- RUN go install -ldflags '-s -w'
12
+ ENV GO111MODULE=on
13
+ RUN go get -d .
14
+
15
+ ARG CGO=0
16
+ ENV CGO_ENABLED=${CGO}
17
+ ENV GOOS=linux
18
+
19
+ # default non-existent build tag so -tags always has an arg
20
+ ARG BUILD_TAGS="99notag"
21
+ RUN go install -ldflags '-w -extldflags "-static"' -tags ${BUILD_TAGS}
17
22
18
23
# ---
19
24
20
25
FROM scratch
21
26
COPY --from=build /go/bin/hugo /hugo
22
- WORKDIR /site
23
- VOLUME /site
27
+ ARG WORKDIR="/site"
28
+ WORKDIR ${WORKDIR}
29
+ VOLUME ${WORKDIR}
24
30
EXPOSE 1313
25
31
ENTRYPOINT [ "/hugo" ]
26
32
CMD [ "--help" ]
You can’t perform that action at this time.
0 commit comments