forked from RedHatInsights/pdf-generator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
26 lines (18 loc) · 834 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
FROM registry.access.redhat.com/ubi8/nodejs-16
USER 0
WORKDIR /pdf-gen
ADD . /pdf-gen
# RUN npm install using package-lock.json
RUN npm ci
# Install the chromium locally if necessary.
RUN node node_modules/puppeteer/install.js
RUN chmod -R o+rwx node_modules/puppeteer/.local-chromium
# Check for circular dependencies
RUN node circular.js
# install puppeteer/chromium dependencies
RUN dnf install -y bzip2 fontconfig nss.x86_64 pango.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXtst.x86_64 cups-libs.x86_64 libXScrnSaver.x86_64 libXrandr.x86_64 GConf2.x86_64 alsa-lib.x86_64 atk.x86_64 gtk3.x86_64 libdrm libgbm libxshmfence GConf2 nss libXScrnSaver alsa-lib wget
# Set node env variable
ENV NODE_ENV=production
RUN npm run build
EXPOSE 8000
CMD ["node", "./dist/index.js"]