-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.chromium
33 lines (24 loc) · 1.06 KB
/
Dockerfile.chromium
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
FROM node:18-bookworm-slim as builder
ADD app.js /app/
ADD package.json /app/
ADD lib /app/lib
WORKDIR /app
RUN NODE_ENV=production PUPPETEER_SKIP_CHROME_DOWNLOAD=false npm install
FROM node:18-bookworm-slim
LABEL version="1.0"
LABEL maintainer="Hive Solutions <development@hive.pt>"
RUN DEBIAN_FRONTEND=noninteractive apt-get update &&\
DEBIAN_FRONTEND=noninteractive apt-get install -y fonts-arphic-uming\
fonts-wqy-zenhei fonts-thai-tlwg fonts-khmeros fonts-kacst fonts-freefont-ttf\
fonts-ipafont-gothic fonts-liberation fonts-noto-cjk fonts-noto-color-emoji\
fonts-arphic-ukai ttf-wqy-zenhei ttf-wqy-microhei libxss1 dbus dbus-x11\
fontconfig chromium --no-install-recommends &&\
DEBIAN_FRONTEND=noninteractive apt-get autoremove -y && apt-get clean &&\
rm -rf /var/lib/apt/lists/* && rm -rf /var/cache/apt
ENV HOST 0.0.0.0
ENV PORT 8080
ENV NODE_ENV production
ENV PUPPETEER_EXECUTABLE_PATH /usr/bin/chromium
COPY --from=builder /app/node_modules /app/node_modules
COPY --from=builder /app /app
CMD ["/usr/local/bin/node", "/app/app.js"]