forked from l0co/docker-puppeteer-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (31 loc) · 844 Bytes
/
Dockerfile
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
34
35
36
37
FROM alpine:3.20.3
ENV IMAGE_NAME=puppeteer-api
ENV IMAGE_VERSION=2.1
LABEL docker.image.name=$IMAGE_NAME
LABEL image.version=$IMAGE_VERSION
STOPSIGNAL SIGTERM
# install dependencies
RUN \
set -x \
&& apk update \
&& apk add \
bash \
nodejs \
npm \
chromium
COPY resources/root /root
WORKDIR /root/puppeteer-api
RUN npm install
COPY resources/bootstrap.sh /
RUN chmod 0755 /bootstrap.sh
COPY resources/bootstrap-start.sh /
RUN chmod 0755 /bootstrap-start.sh
COPY resources/bootstrap-stop.sh /
RUN chmod 0755 /bootstrap-stop.sh
COPY resources/healthcheck.sh /
RUN chmod 0755 /healthcheck.sh
COPY resources/usr/local/bin/puppeteer /usr/local/bin
RUN chmod 0755 /usr/local/bin/puppeteer
ENTRYPOINT ["/bootstrap.sh"]
HEALTHCHECK --interval=10s --timeout=5s --retries=3 CMD [ "/healthcheck.sh" ]
EXPOSE 9222 8000