Service-Xi commited on
Commit
d93dae7
·
verified ·
1 Parent(s): 21d0853

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -10
Dockerfile CHANGED
@@ -38,16 +38,14 @@ RUN git clone https://github.com/Kingdavid102/my-api.git /app-temp && \
38
  # Install dependencies
39
  RUN npm install
40
 
41
- # Install Playwright with all browsers
42
- RUN npx playwright install --with-deps chromium && \
43
- npx playwright install-deps
44
-
45
- # Set proper permissions
46
- RUN chown -R node:node /app && \
47
- mkdir -p /home/node/.cache/ms-playwright && \
48
- chown -R node:node /home/node/.cache && \
49
- mkdir -p /app/screenshots && \
50
- chown -R node:node /app/screenshots
51
 
52
  # Run as non-root user
53
  USER node
 
38
  # Install dependencies
39
  RUN npm install
40
 
41
+ # Set Playwright cache path
42
+ ENV PLAYWRIGHT_BROWSERS_PATH=/home/node/.cache/ms-playwright
43
+
44
+ # Install Playwright browsers (force full installation)
45
+ RUN npx playwright install --with-deps chromium
46
+
47
+ # Fix permissions for Playwright
48
+ RUN chmod -R 777 /home/node/.cache/ms-playwright
 
 
49
 
50
  # Run as non-root user
51
  USER node