Update Dockerfile
Browse files- Dockerfile +22 -15
Dockerfile
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
-
|
2 |
-
FROM python:3.10 as base
|
3 |
-
|
4 |
-
|
|
|
5 |
fonts-liberation \
|
6 |
libasound2 \
|
7 |
libatk-bridge2.0-0 \
|
@@ -12,7 +13,6 @@ RUN apt-get update && apt-get install -y \
|
|
12 |
libdrm2 \
|
13 |
libgbm1 \
|
14 |
libgtk-3-0 \
|
15 |
-
# libgtk-4-1 \
|
16 |
libnspr4 \
|
17 |
libnss3 \
|
18 |
libwayland-client0 \
|
@@ -23,17 +23,24 @@ RUN apt-get update && apt-get install -y \
|
|
23 |
libxrandr2 \
|
24 |
xdg-utils \
|
25 |
libu2f-udev \
|
26 |
-
libvulkan1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
RUN rm google-chrome-stable_current_amd64.deb
|
31 |
-
# Check chrome version
|
32 |
-
RUN echo "Chrome: " && google-chrome --version
|
33 |
-
COPY ["requirements.txt", "app.py"]
|
34 |
-
COPY . .
|
35 |
COPY app.py .
|
36 |
-
RUN pip install -r requirements.txt
|
37 |
-
CMD python app.py
|
38 |
|
|
|
|
|
39 |
|
|
|
|
|
|
1 |
+
# Base image
|
2 |
+
FROM python:3.10-slim as base
|
3 |
+
|
4 |
+
# Chrome dependency installation
|
5 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
6 |
fonts-liberation \
|
7 |
libasound2 \
|
8 |
libatk-bridge2.0-0 \
|
|
|
13 |
libdrm2 \
|
14 |
libgbm1 \
|
15 |
libgtk-3-0 \
|
|
|
16 |
libnspr4 \
|
17 |
libnss3 \
|
18 |
libwayland-client0 \
|
|
|
23 |
libxrandr2 \
|
24 |
xdg-utils \
|
25 |
libu2f-udev \
|
26 |
+
libvulkan1 \
|
27 |
+
&& rm -rf /var/lib/apt/lists/*
|
28 |
+
|
29 |
+
# Install Google Chrome
|
30 |
+
RUN curl -LO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
|
31 |
+
apt-get update && apt-get install -y --no-install-recommends ./google-chrome-stable_current_amd64.deb && \
|
32 |
+
rm google-chrome-stable_current_amd64.deb && \
|
33 |
+
apt-get clean && rm -rf /var/lib/apt/lists/*
|
34 |
+
|
35 |
+
# Check Chrome version
|
36 |
+
RUN google-chrome --version
|
37 |
|
38 |
+
# Copy application files
|
39 |
+
COPY requirements.txt .
|
|
|
|
|
|
|
|
|
|
|
40 |
COPY app.py .
|
|
|
|
|
41 |
|
42 |
+
# Install Python dependencies
|
43 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
44 |
|
45 |
+
# Set the entry point
|
46 |
+
CMD ["python", "app.py"]
|