Dmitry Beresnev
commited on
Commit
·
6be1c8b
1
Parent(s):
b88c474
fix dockerfile
Browse files- Dockerfile +10 -0
Dockerfile
CHANGED
|
@@ -37,6 +37,16 @@ RUN apt-get update && apt-get install -y \
|
|
| 37 |
COPY requirements.txt .
|
| 38 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
# Set Playwright to use system Chromium
|
| 41 |
ENV PLAYWRIGHT_BROWSERS_PATH=0
|
| 42 |
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
|
|
|
|
| 37 |
COPY requirements.txt .
|
| 38 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 39 |
|
| 40 |
+
# Find Chromium installation and create symlink if needed
|
| 41 |
+
RUN if [ -f /usr/bin/chromium-browser ]; then \
|
| 42 |
+
ln -sf /usr/bin/chromium-browser /usr/bin/chromium; \
|
| 43 |
+
elif [ -f /usr/lib/chromium/chromium ]; then \
|
| 44 |
+
ln -sf /usr/lib/chromium/chromium /usr/bin/chromium; \
|
| 45 |
+
fi
|
| 46 |
+
|
| 47 |
+
# Verify Chromium is accessible
|
| 48 |
+
RUN which chromium || (echo "ERROR: Chromium not found!" && exit 1)
|
| 49 |
+
|
| 50 |
# Set Playwright to use system Chromium
|
| 51 |
ENV PLAYWRIGHT_BROWSERS_PATH=0
|
| 52 |
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
|