Mohammed Foud commited on
Commit
b7f5984
·
1 Parent(s): ebccf84

first commit

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -5
Dockerfile CHANGED
@@ -4,13 +4,13 @@ FROM node:latest
4
  ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
5
 
6
  # Install Google Chrome Stable and fonts
 
7
  RUN apt-get update && apt-get install curl gnupg -y \
8
  && curl --location --silent https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
9
  && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
10
  && apt-get update \
11
  && apt-get install google-chrome-stable -y --no-install-recommends \
12
  && rm -rf /var/lib/apt/lists/*
13
-
14
  WORKDIR /app
15
 
16
  RUN npm install -g pnpm
@@ -20,10 +20,8 @@ COPY package.json pnpm-lock.yaml ./
20
  RUN pnpm install --frozen-lockfile
21
 
22
  COPY . .
23
-
24
- # Set permissions for the /app directory
25
  RUN chmod -R 777 /app
26
 
27
  EXPOSE 7860
28
-
29
- CMD ["node", "app.js"]
 
4
  ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
5
 
6
  # Install Google Chrome Stable and fonts
7
+ # Note: this installs the necessary libs to make the browser work with Puppeteer.
8
  RUN apt-get update && apt-get install curl gnupg -y \
9
  && curl --location --silent https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
10
  && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
11
  && apt-get update \
12
  && apt-get install google-chrome-stable -y --no-install-recommends \
13
  && rm -rf /var/lib/apt/lists/*
 
14
  WORKDIR /app
15
 
16
  RUN npm install -g pnpm
 
20
  RUN pnpm install --frozen-lockfile
21
 
22
  COPY . .
 
 
23
  RUN chmod -R 777 /app
24
 
25
  EXPOSE 7860
26
+ WORKDIR /app/src
27
+ CMD ["node", "index.js"]