Update Dockerfile
Browse files- Dockerfile +11 -7
Dockerfile
CHANGED
|
@@ -1,18 +1,20 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
# Install
|
| 4 |
-
RUN
|
| 5 |
-
|
| 6 |
-
|
| 7 |
git \
|
| 8 |
-
build-essential \
|
| 9 |
libnss3 \
|
| 10 |
libxss1 \
|
| 11 |
libasound2 \
|
| 12 |
libatk-bridge2.0-0 \
|
| 13 |
libgtk-3-0 \
|
|
|
|
| 14 |
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
|
|
|
|
| 16 |
RUN useradd -m -u 1000 user
|
| 17 |
USER user
|
| 18 |
ENV HOME=/home/user \
|
|
@@ -23,9 +25,11 @@ WORKDIR $HOME/app
|
|
| 23 |
RUN mkdir -p $HOME/app/static && chown -R user:user $HOME/app/static
|
| 24 |
COPY --chown=user requirements.txt .
|
| 25 |
|
| 26 |
-
# Install Python
|
| 27 |
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
| 28 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
| 29 |
RUN playwright install chromium
|
| 30 |
RUN playwright install-deps chromium
|
| 31 |
|
|
|
|
| 1 |
+
# 1. Use the FULL image to get all build tools by default
|
| 2 |
+
FROM python:3.11
|
| 3 |
|
| 4 |
+
# 2. Install Node.js (Required for OpenClaw's internal bridge) and system libs
|
| 5 |
+
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
| 6 |
+
apt-get update && apt-get install -y \
|
| 7 |
+
nodejs \
|
| 8 |
git \
|
|
|
|
| 9 |
libnss3 \
|
| 10 |
libxss1 \
|
| 11 |
libasound2 \
|
| 12 |
libatk-bridge2.0-0 \
|
| 13 |
libgtk-3-0 \
|
| 14 |
+
libgbm1 \
|
| 15 |
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
|
| 17 |
+
# 3. Setup User
|
| 18 |
RUN useradd -m -u 1000 user
|
| 19 |
USER user
|
| 20 |
ENV HOME=/home/user \
|
|
|
|
| 25 |
RUN mkdir -p $HOME/app/static && chown -R user:user $HOME/app/static
|
| 26 |
COPY --chown=user requirements.txt .
|
| 27 |
|
| 28 |
+
# 4. Install Python stack with latest build tools
|
| 29 |
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
| 30 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 31 |
+
|
| 32 |
+
# 5. Setup Playwright for the take_screenshot tool
|
| 33 |
RUN playwright install chromium
|
| 34 |
RUN playwright install-deps chromium
|
| 35 |
|