# Use Python 3.11 as the base image. FROM python:3.11-slim # Set the working directory inside the container. WORKDIR /app # Install system dependencies required for Git and Playwright. # We install a minimal set of libraries to keep the image small. RUN apt-get update \ && apt-get install -y --no-install-recommends \ git \ libnss3 \ libnspr4 \ libdbus-1-3 \ libatk1.0-0 \ libatk-bridge2.0-0 \ libcups2 \ libdrm2 \ libgdk-pixbuf2.0-0 \ libglib2.0-0 \ libgssapi-krb5-2 \ libxcomposite1 \ libxcursor1 \ libxdamage1 \ libxext6 \ libxfixes3 \ libxi6 \ libxrandr2 \ libxrender1 \ libxkbcommon0 \ libx11-xcb1 \ libxshmfence1 \ libgbm1 \ libwayland-client0 \ libwayland-egl1 \ libwayland-cursor0 \ libexpat1 \ libfontconfig1 \ libharfbuzz0b \ libfreetype6 \ libpng16-16 \ libjpeg62-turbo \ libwebp6 \ libglib2.0-0 \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # Clone the web-ui repository from GitHub. RUN git clone https://github.com/browser-use/web-ui.git # Set the working directory to the newly cloned repository. WORKDIR /app/web-ui # Install Python dependencies using uv and install the Chromium browser with Playwright. RUN pip install uv \ && uv pip install -r requirements.txt \ && playwright install --with-deps chromium # Expose the default port for the web application. EXPOSE 7788 # Command to run the application when the container starts. # We bind to 0.0.0.0 to make the web UI accessible from outside the container. CMD ["python", "webui.py", "--ip", "0.0.0.0", "--port", "7860"]