-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
44 lines (37 loc) · 1.08 KB
/
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
38
39
40
41
42
43
44
FROM node:18.16-bookworm
LABEL author="Toshiaki Baba<toshiaki@netmark.jp>"
# install chromium dependencies
RUN apt-get update \
&& apt-get -y install \
libxcomposite1 \
libxcursor1 \
libxi6 \
libxtst6 \
libnss3 \
libcups2 \
libxss1 \
libxrandr2 \
libasound2 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libgtk-3-0 \
libx11-xcb1 \
libdrm2 \
libgbm1 \
poppler-utils \
fonts-noto-cjk \
fonts-noto-cjk-extra \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY . /opt/pptrhtmltopdf
RUN chown -R node:node /opt/pptrhtmltopdf
ENV CHROME_VERSION=116.0.5829.0
#ENV CHROME_VERSION=latest
RUN npx @puppeteer/browsers install chrome@$CHROME_VERSION
RUN npx @puppeteer/browsers install chromedriver@$CHROME_VERSION
RUN ln -s /opt/pptrhtmltopdf/node_modules/.bin/pptrhtmltopdf /usr/local/bin/pptrhtmltopdf || :
RUN chmod 777 /mnt
USER node
RUN cd /opt/pptrhtmltopdf \
&& npm install pptrhtmltopdf
ENTRYPOINT ["/usr/local/bin/pptrhtmltopdf", "--no-sandbox"]