42Cummer commited on
Commit
c2a5c17
·
verified ·
1 Parent(s): de0437f

dwinadinwjdaiwsjh

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -3
Dockerfile CHANGED
@@ -3,7 +3,9 @@
3
 
4
  ENV DEBIAN_FRONTEND=noninteractive \
5
  PYTHONUNBUFFERED=1 \
6
- PIP_NO_CACHE_DIR=1
 
 
7
 
8
  # System deps + fonts Playwright/Chromium need
9
  RUN apt-get update && apt-get install -y \
@@ -17,14 +19,17 @@
17
  xdg-utils lsb-release && \
18
  rm -rf /var/lib/apt/lists/*
19
 
 
 
 
20
  WORKDIR /app
21
 
22
  # Python deps
23
  COPY requirements.txt .
24
  RUN python3 -m pip install -r requirements.txt
25
 
26
- # Install Playwright browsers + (re)check deps on this Ubuntu
27
- RUN python3 -m playwright install --with-deps
28
 
29
  # Copy app
30
  COPY . .
 
3
 
4
  ENV DEBIAN_FRONTEND=noninteractive \
5
  PYTHONUNBUFFERED=1 \
6
+ PIP_NO_CACHE_DIR=1 \
7
+ # Put PW browsers in a shared, non-root path
8
+ PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
9
 
10
  # System deps + fonts Playwright/Chromium need
11
  RUN apt-get update && apt-get install -y \
 
19
  xdg-utils lsb-release && \
20
  rm -rf /var/lib/apt/lists/*
21
 
22
+ # Ensure the shared browser path exists and is readable
23
+ RUN mkdir -p /ms-playwright && chmod -R 0755 /ms-playwright
24
+
25
  WORKDIR /app
26
 
27
  # Python deps
28
  COPY requirements.txt .
29
  RUN python3 -m pip install -r requirements.txt
30
 
31
+ # Install ONLY Chromium (+ verify deps) into /ms-playwright
32
+ RUN python3 -m playwright install --with-deps chromium
33
 
34
  # Copy app
35
  COPY . .