-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
43 lines (35 loc) · 1.54 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
FROM node:18
ENV USER=root
ENV DISPLAY=:1
ENV RESOLUTION=1080x720
# Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others)
# Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteer
# installs, work.
RUN apt-get update \
&& apt-get install -y wget gnupg tightvncserver xfce4 xfce4-goodies xfonts-base dbus-x11 novnc \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/googlechrome-linux-keyring.gpg \
&& sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/googlechrome-linux-keyring.gpg] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-khmeros fonts-kacst fonts-freefont-ttf libxss1 \
--no-install-recommends \
&& ln /usr/share/novnc/vnc.html /usr/share/novnc/index.html \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /app
COPY . /app/
WORKDIR /app
ENV NODE_PATH=/app/node_modules
RUN groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser \
&& mkdir -p /home/pptruser/Downloads \
&& chown -R pptruser:pptruser /home/pptruser \
&& chown -R pptruser:pptruser /app \
&& chmod +x start_vnc.sh \
&& chmod +x start_container.sh
USER pptruser
RUN yarn install
# puppeteer-service
EXPOSE 3000
# VNC-server
EXPOSE 5901
# NoVNC
EXPOSE 5900
CMD ./start_container.sh