Update Dockerfile
Browse files- Dockerfile +58 -25
Dockerfile
CHANGED
|
@@ -1,31 +1,64 @@
|
|
| 1 |
-
# Use
|
| 2 |
-
|
| 3 |
-
# but 'latest' is used here for convenience.
|
| 4 |
-
FROM smanx/browser-use-web-ui:latest
|
| 5 |
|
| 6 |
-
# Set
|
| 7 |
-
|
| 8 |
|
| 9 |
-
#
|
| 10 |
-
#
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
#
|
| 17 |
-
|
| 18 |
-
BROWSER_DEBUGGING_HOST="localhost" \
|
| 19 |
-
BROWSER_USE_LOGGING_LEVEL="info" \
|
| 20 |
-
ANONYMIZED_TELEMETRY="false" \
|
| 21 |
-
KEEP_BROWSER_OPEN="false"
|
| 22 |
|
| 23 |
-
#
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
EXPOSE 7788
|
| 26 |
-
EXPOSE 6080
|
| 27 |
-
EXPOSE 5901
|
| 28 |
-
EXPOSE 9222
|
| 29 |
|
| 30 |
-
#
|
| 31 |
-
#
|
|
|
|
|
|
| 1 |
+
# Use Python 3.11 as the base image.
|
| 2 |
+
FROM python:3.11-slim
|
|
|
|
|
|
|
| 3 |
|
| 4 |
+
# Set the working directory inside the container.
|
| 5 |
+
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Install system dependencies required for Git and Playwright.
|
| 8 |
+
# We install a minimal set of libraries to keep the image small.
|
| 9 |
+
RUN apt-get update \
|
| 10 |
+
&& apt-get install -y --no-install-recommends \
|
| 11 |
+
git \
|
| 12 |
+
libnss3 \
|
| 13 |
+
libnspr4 \
|
| 14 |
+
libdbus-1-3 \
|
| 15 |
+
libatk1.0-0 \
|
| 16 |
+
libatk-bridge2.0-0 \
|
| 17 |
+
libcups2 \
|
| 18 |
+
libdrm2 \
|
| 19 |
+
libgdk-pixbuf2.0-0 \
|
| 20 |
+
libglib2.0-0 \
|
| 21 |
+
libgssapi-krb5-2 \
|
| 22 |
+
libxcomposite1 \
|
| 23 |
+
libxcursor1 \
|
| 24 |
+
libxdamage1 \
|
| 25 |
+
libxext6 \
|
| 26 |
+
libxfixes3 \
|
| 27 |
+
libxi6 \
|
| 28 |
+
libxrandr2 \
|
| 29 |
+
libxrender1 \
|
| 30 |
+
libxkbcommon0 \
|
| 31 |
+
libx11-xcb1 \
|
| 32 |
+
libxshmfence1 \
|
| 33 |
+
libgbm1 \
|
| 34 |
+
libwayland-client0 \
|
| 35 |
+
libwayland-egl1 \
|
| 36 |
+
libwayland-cursor0 \
|
| 37 |
+
libexpat1 \
|
| 38 |
+
libfontconfig1 \
|
| 39 |
+
libharfbuzz0b \
|
| 40 |
+
libfreetype6 \
|
| 41 |
+
libpng16-16 \
|
| 42 |
+
libjpeg62-turbo \
|
| 43 |
+
libwebp6 \
|
| 44 |
+
libglib2.0-0 \
|
| 45 |
+
&& apt-get clean \
|
| 46 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 47 |
|
| 48 |
+
# Clone the web-ui repository from GitHub.
|
| 49 |
+
RUN git clone https://github.com/browser-use/web-ui.git
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
+
# Set the working directory to the newly cloned repository.
|
| 52 |
+
WORKDIR /app/web-ui
|
| 53 |
+
|
| 54 |
+
# Install Python dependencies using uv and install the Chromium browser with Playwright.
|
| 55 |
+
RUN pip install uv \
|
| 56 |
+
&& uv pip install -r requirements.txt \
|
| 57 |
+
&& playwright install --with-deps chromium
|
| 58 |
+
|
| 59 |
+
# Expose the default port for the web application.
|
| 60 |
EXPOSE 7788
|
|
|
|
|
|
|
|
|
|
| 61 |
|
| 62 |
+
# Command to run the application when the container starts.
|
| 63 |
+
# We bind to 0.0.0.0 to make the web UI accessible from outside the container.
|
| 64 |
+
CMD ["python", "webui.py", "--ip", "0.0.0.0", "--port", "7860"]
|