From 40d8792294bbdc324926bccdc119eb43b010c958 Mon Sep 17 00:00:00 2001 From: samanhappy Date: Mon, 14 Apr 2025 20:01:24 +0800 Subject: [PATCH] fix: update Dockerfile to conditionally install Playwright dependencies for Chrome based on architecture --- .github/workflows/build.yml | 2 +- Dockerfile | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c510422..3078fdc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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' }} diff --git a/Dockerfile b/Dockerfile index 01fc833..cd8076c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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