fix: update Dockerfile to conditionally install Playwright dependencies for Chrome based on architecture

This commit is contained in:
samanhappy
2025-04-14 20:01:24 +08:00
parent 7f887a7031
commit 40d8792294
2 changed files with 7 additions and 2 deletions

View File

@@ -44,6 +44,6 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/arm64
platforms: linux/amd64,linux/arm64
build-args: |
INSTALL_EXT=${{ matrix.variant == 'full' && 'true' || 'false' }}

View File

@@ -19,7 +19,12 @@ RUN mkdir -p $PNPM_HOME && \
ARG INSTALL_EXT=false
RUN if [ "$INSTALL_EXT" = "true" ]; then \
npx -y playwright install --with-deps chrome; \
ARCH=$(uname -m); \
if [ "$ARCH" = "x86_64" ]; then \
npx -y playwright install --with-deps chrome; \
else \
echo "Skipping Chrome installation on non-amd64 architecture: $ARCH"; \
fi; \
fi
RUN uv tool install mcp-server-fetch