Add some comments in Dockerfile
This commit is contained in:
parent
22f0d5cbd6
commit
9e27fcdcb4
11
Dockerfile
11
Dockerfile
@ -1,3 +1,12 @@
|
|||||||
|
# Dockerfile for Hugo (HUGO=hugo) / Hugo Extended (HUGO=hugo_extended)
|
||||||
|
# HUGO_VERSION / HUGO_SHA / HUGO_EXTENDED_SHA is automatically updated
|
||||||
|
# by update.py when new release is available on the upstream.
|
||||||
|
# Utilize multi-stage builds to make images optimized in size.
|
||||||
|
|
||||||
|
# First stage - download prebuilt hugo binary from the GitHub release.
|
||||||
|
# Use golang image to run https://github.com/yaegashi/muslstack
|
||||||
|
# on hugo executable to extend its default thread stack size to 8MB
|
||||||
|
# to work around segmentation fault issues.
|
||||||
FROM golang:1.12-alpine
|
FROM golang:1.12-alpine
|
||||||
ARG HUGO=hugo
|
ARG HUGO=hugo
|
||||||
ARG HUGO_VERSION=0.55.6
|
ARG HUGO_VERSION=0.55.6
|
||||||
@ -15,6 +24,8 @@ RUN set -eux && \
|
|||||||
RUN go get github.com/yaegashi/muslstack
|
RUN go get github.com/yaegashi/muslstack
|
||||||
RUN muslstack -s 0x800000 /usr/bin/hugo
|
RUN muslstack -s 0x800000 /usr/bin/hugo
|
||||||
|
|
||||||
|
# Second stage - build the final image with minimal apk dependencies.
|
||||||
|
# alpine:edge is required for muslstack to work as of June 2019.
|
||||||
FROM alpine:edge
|
FROM alpine:edge
|
||||||
ARG HUGO=hugo
|
ARG HUGO=hugo
|
||||||
COPY --from=0 /usr/bin/hugo /usr/bin
|
COPY --from=0 /usr/bin/hugo /usr/bin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user