build: use supported Node for agent-browser

This commit is contained in:
xiaoxixi 2026-07-28 23:51:45 +08:00
parent 4cc4ff6772
commit e5ad2e9ced

View File

@ -51,8 +51,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
&& pip3 install --no-cache-dir --break-system-packages uv
# Install Node.js and npx
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
# Install Node.js and npx. agent-browser's npm package requires Node.js 24+.
RUN curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& npm config set registry https://registry.npmmirror.com \
&& npm cache clean --force \
@ -75,7 +75,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN apt-get update && apt-get install -y --no-install-recommends \
chromium \
&& ln -sf /usr/bin/chromium /usr/local/bin/chrome \
&& npm install -g agent-browser@0.33.0 \
&& npm install -g --registry=https://registry.npmjs.org agent-browser@0.33.0 \
&& npm cache clean --force \
&& rm -rf /var/lib/apt/lists/*