pvanand commited on
Commit
fb85807
·
verified ·
1 Parent(s): c04d3ae

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +48 -9
Dockerfile CHANGED
@@ -1,20 +1,59 @@
1
- # Use an official Node runtime as the base image
2
- FROM node:14
3
 
4
- # Set the working directory in the container
5
- WORKDIR /usr/src/app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
- # Copy package.json and package-lock.json
8
- COPY package*.json ./
9
 
10
  # Install app dependencies
 
11
  RUN npm install
12
 
13
- # Copy the rest of the application code
14
  COPY . .
15
 
16
- # Make port 3000 available outside the container
17
  EXPOSE 3000
18
 
19
- # Define the command to run the app
20
  CMD [ "node", "server.js" ]
 
1
+ # Dockerfile
2
+ FROM node:16
3
 
4
+ # Install necessary dependencies for Puppeteer
5
+ RUN apt-get update && apt-get install -y \
6
+ gconf-service \
7
+ libasound2 \
8
+ libatk1.0-0 \
9
+ libc6 \
10
+ libcairo2 \
11
+ libcups2 \
12
+ libdbus-1-3 \
13
+ libexpat1 \
14
+ libfontconfig1 \
15
+ libgcc1 \
16
+ libgconf-2-4 \
17
+ libgdk-pixbuf2.0-0 \
18
+ libglib2.0-0 \
19
+ libgtk-3-0 \
20
+ libnspr4 \
21
+ libpango-1.0-0 \
22
+ libpangocairo-1.0-0 \
23
+ libstdc++6 \
24
+ libx11-6 \
25
+ libx11-xcb1 \
26
+ libxcb1 \
27
+ libxcomposite1 \
28
+ libxcursor1 \
29
+ libxdamage1 \
30
+ libxext6 \
31
+ libxfixes3 \
32
+ libxi6 \
33
+ libxrandr2 \
34
+ libxrender1 \
35
+ libxss1 \
36
+ libxtst6 \
37
+ ca-certificates \
38
+ fonts-liberation \
39
+ libappindicator1 \
40
+ libnss3 \
41
+ lsb-release \
42
+ xdg-utils \
43
+ wget
44
 
45
+ # Create app directory
46
+ WORKDIR /usr/src/app
47
 
48
  # Install app dependencies
49
+ COPY package*.json ./
50
  RUN npm install
51
 
52
+ # Bundle app source
53
  COPY . .
54
 
55
+ # Expose port
56
  EXPOSE 3000
57
 
58
+ # Start the app
59
  CMD [ "node", "server.js" ]