darkvibe314 commited on
Commit
46056ec
·
verified ·
1 Parent(s): 13fa64b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -19
Dockerfile CHANGED
@@ -1,26 +1,15 @@
1
- FROM node:18
2
 
3
- # 1. Install required system dependencies for headless Chrome
4
- RUN apt-get update && apt-get install -y \
5
- gconf-service libgbm-dev libasound2 libatk1.0-0 libc6 libcairo2 libcups2 \
6
- libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 \
7
- libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 \
8
- libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 \
9
- libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates \
10
- fonts-liberation libnss3 lsb-release xdg-utils wget \
11
- --no-install-recommends && rm -rf /var/lib/apt/lists/*
12
 
13
- # 2. Use the existing "node" user (which is already UID 1000)
14
- USER node
15
- ENV HOME=/home/node
16
- WORKDIR $HOME/app
17
 
18
- # 3. Install packages (Puppeteer will automatically download Chrome here!)
19
- COPY --chown=node package*.json ./
20
  RUN npm install
21
 
22
- # 4. Copy application code
23
- COPY --chown=node . .
24
 
25
  EXPOSE 7860
26
- CMD ["node", "server.js"]
 
1
+ FROM ghcr.io/puppeteer/puppeteer:latest
2
 
3
+ # Use the Chrome that is already built into this official image
4
+ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
5
+ PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome-stable
 
 
 
 
 
 
6
 
7
+ WORKDIR /usr/src/app
 
 
 
8
 
9
+ COPY package*.json ./
 
10
  RUN npm install
11
 
12
+ COPY . .
 
13
 
14
  EXPOSE 7860
15
+ CMD [ "node", "server.js" ]