pvanand commited on
Commit
98f5598
·
verified ·
1 Parent(s): f9e7b09

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +37 -0
Dockerfile ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dockerfile
2
+ FROM node:16
3
+
4
+ # Install latest chrome dev package and fonts to support major charsets
5
+ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
6
+ && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
7
+ && apt-get update \
8
+ && apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \
9
+ --no-install-recommends \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ WORKDIR /usr/src/app
13
+
14
+ # Add user so we don't need --no-sandbox.
15
+ RUN groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser \
16
+ && mkdir -p /home/pptruser/Downloads \
17
+ && chown -R pptruser:pptruser /home/pptruser
18
+
19
+ # Install app dependencies
20
+ COPY package*.json ./
21
+ RUN npm install
22
+
23
+ # Bundle app source
24
+ COPY . .
25
+
26
+ # Set correct permissions
27
+ RUN chown -R pptruser:pptruser /usr/src/app
28
+
29
+ # Create a directory for temporary files with correct permissions
30
+ RUN mkdir -p /tmp/marp-work && chown -R pptruser:pptruser /tmp/marp-work && chmod -R 777 /tmp/marp-work
31
+
32
+ # Run everything after as non-privileged user.
33
+ USER pptruser
34
+
35
+ EXPOSE 7860
36
+
37
+ CMD ["node", "server.js"]