-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
23 lines (18 loc) · 907 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
FROM node:12.16.2-stretch
EXPOSE 3333
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] 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-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxtst6 libxss1 \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
RUN npm i puppeteer \
# Add user so we don't need --no-sandbox.
# same layer as npm install to keep re-chowned files from using up several hundred MBs more space
&& usermod -G audio,video node \
&& mkdir -p /home/node/Downloads \
&& chown -R node:node /home/node \
&& chown -R node:node /node_modules
USER node
WORKDIR /home/node/app/server
CMD [ "node", "./src/index.js" ]