Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

fix: correct Dockerfile and CLA email

Ameya-2003631499d4dea0
diff --git a/Dockerfile b/Dockerfile
index 79181aaa9..65583148a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,44 +1,29 @@
-# Use a specific Python 3.11 slim image as the base
FROM python:3.11.3-slim
-# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
-# Install system dependencies
+# Install minimal system dependencies required for Chrome
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
curl \
unzip \
- xvfb \
libnss3 \
- libatk-bridge2.0-0 \
- libgtk-3-0 \
libxss1 \
libasound2 \
libx11-xcb1 \
- libxcb-dri3-0 \
- libdrm2 \
- libgbm1 \
- libxcomposite1 \
- libxdamage1 \
- libxrandr2 \
- libxinerama1 \
- libxcursor1 \
- libxi6 \
- libgl1-mesa-glx \
+ && apt-get clean \
&& rm -rf /var/lib/apt/lists/*
-# Create a non-root user
-RUN addgroup --system appgroup && adduser --system --ingroup appgroup appuser
+# Create non-root user
+RUN groupadd appgroup && useradd -m -g appgroup appuser
-# Set work directory
WORKDIR /app
# Copy project files
COPY . /app/
-# Change ownership to the non-root user
+# Change ownership
RUN chown -R appuser:appgroup /app
# Switch to non-root user
@@ -48,9 +33,9 @@ USER appuser
RUN pip install --upgrade pip \
&& pip install .
-# Define health check (example: adjust as needed)
+# Healthcheck (optional)
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8000/health || exit 1
-# Define default command
-CMD ["python", "-m", "browser_use"]
+# Default command
+CMD ["python", "-m", "browser_use"]
\ No newline at end of file