Update Dockerfile
Browse files- Dockerfile +4 -0
Dockerfile
CHANGED
@@ -2,6 +2,7 @@ FROM python:3.11-slim AS base
|
|
2 |
|
3 |
WORKDIR /app
|
4 |
|
|
|
5 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
6 |
wget \
|
7 |
unzip \
|
@@ -25,12 +26,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
25 |
libpangocairo-1.0-0 \
|
26 |
libx11-6 \
|
27 |
xvfb \
|
|
|
28 |
&& rm -rf /var/lib/apt/lists/*
|
29 |
|
30 |
COPY . /app/
|
31 |
|
32 |
RUN pip install --no-cache-dir -r requirements.txt
|
33 |
|
|
|
34 |
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
|
35 |
RUN mkdir -p $PLAYWRIGHT_BROWSERS_PATH && playwright install chromium --with-deps
|
36 |
|
@@ -45,4 +48,5 @@ USER user
|
|
45 |
ENV HOME=/home/user \
|
46 |
PATH=/home/user/.local/bin:$PATH
|
47 |
|
|
|
48 |
ENTRYPOINT ["xvfb-run", "/app/entrypoint.sh"]
|
|
|
2 |
|
3 |
WORKDIR /app
|
4 |
|
5 |
+
# Instalacja wymaganych narzędzi, w tym xvfb i xauth
|
6 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
7 |
wget \
|
8 |
unzip \
|
|
|
26 |
libpangocairo-1.0-0 \
|
27 |
libx11-6 \
|
28 |
xvfb \
|
29 |
+
xauth \
|
30 |
&& rm -rf /var/lib/apt/lists/*
|
31 |
|
32 |
COPY . /app/
|
33 |
|
34 |
RUN pip install --no-cache-dir -r requirements.txt
|
35 |
|
36 |
+
# Zainstalowanie przeglądarki Playwright
|
37 |
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
|
38 |
RUN mkdir -p $PLAYWRIGHT_BROWSERS_PATH && playwright install chromium --with-deps
|
39 |
|
|
|
48 |
ENV HOME=/home/user \
|
49 |
PATH=/home/user/.local/bin:$PATH
|
50 |
|
51 |
+
# Uruchamianie aplikacji za pomocą xvfb-run
|
52 |
ENTRYPOINT ["xvfb-run", "/app/entrypoint.sh"]
|