-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
18 lines (16 loc) · 642 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM golang:1.12 as builder
WORKDIR /code
RUN set -xe
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY cmd/ ./cmd
RUN CGO_ENABLED=0 GO111MODULE=on go build -a -ldflags '-extldflags "-static"' -o /tmp/html2image ./cmd/newweb
FROM sempr/chrome-headless:20190531-notofont
ENV SCREENSHOT_CHROME_PATH /headless-shell/headless-shell
COPY --from=builder /tmp/html2image /usr/bin/html2image
ADD entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
HEALTHCHECK --interval=5s --timeout=3s CMD curl -fs http://localhost:9222 && curl -fs -m 2 -o /dev/null "http://localhost:8080/render?width=300&html=abc" || kill -15 1
USER root
EXPOSE 8080