-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathDockerfile
31 lines (26 loc) · 814 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
FROM node:13-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
# Install unoconv and LibreOffice for document to PDF conversion
unoconv \
libreoffice-writer \
libreoffice-draw \
libreoffice-calc \
libreoffice-impress \
# Install Chromium for puppeteer
chromium \
&& rm -rf /var/lib/apt/lists/*
# Use Debian Chromium package instead of bundled Chromium
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
ENV PUPPETEER_EXECUTABLE_PATH /usr/bin/chromium
WORKDIR /app
COPY package*.json ./
RUN npm install \
&& groupadd -r accelerator && useradd -r -g accelerator -G audio,video accelerator \
&& mkdir -p /home/accelerator/Downloads \
&& chown -R accelerator:accelerator /home/accelerator \
&& chown -R accelerator:accelerator /app
USER accelerator
COPY . .
EXPOSE 8080
CMD [ "node", "server.js" ]