From 14c40269c9cba2d6b728633683376a7705479663 Mon Sep 17 00:00:00 2001 From: Jayson Jacobs Date: Wed, 8 Jul 2026 22:55:51 -0600 Subject: [PATCH 1/2] fix(docker): raise yarn network timeout for QEMU-emulated arm64 builds The arm64 buildx leg runs under QEMU, where TLS and IO are slow enough that large tarballs (viem and the other wallet deps pulled in by @x402/paywall) exceed yarn's 30s default socket timeout and fail with ESOCKETTIMEDOUT. Also mount the yarn cache for the production-prune install, which previously ran without it (YARN_CACHE_FOLDER pointed into the unmounted cache path) and re-downloaded every package a second time. Co-Authored-By: Claude Fable 5 --- Dockerfile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0750ec7..e3e83d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,14 +10,20 @@ ENV YARN_CACHE_FOLDER=/usr/local/share/.cache/yarn/$TARGETARCH COPY package.json yarn.lock ./ COPY .npmrc* ./ +# --network-timeout: the arm64 leg builds under QEMU emulation where TLS/IO are +# slow enough that large tarballs (viem, @x402/paywall's wallet deps) blow past +# yarn's 30s default and fail with ESOCKETTIMEDOUT. RUN --mount=type=cache,target=/usr/local/share/.cache/yarn/$TARGETARCH,sharing=locked \ - corepack enable && yarn install --frozen-lockfile + corepack enable && yarn install --frozen-lockfile --network-timeout 600000 COPY . . RUN yarn build -# Remove devDependencies — native addons for production deps are already compiled -RUN yarn install --frozen-lockfile --production --ignore-scripts +# Remove devDependencies — native addons for production deps are already compiled. +# Same cache mount as the full install so this resolves from the warm cache +# instead of re-downloading everything over the network. +RUN --mount=type=cache,target=/usr/local/share/.cache/yarn/$TARGETARCH,sharing=locked \ + yarn install --frozen-lockfile --production --ignore-scripts --network-timeout 600000 # Production stage FROM node:22-slim From 620af7cdad2135925f6229c57acac17d6dacd1d4 Mon Sep 17 00:00:00 2001 From: Jayson Jacobs Date: Wed, 8 Jul 2026 23:09:14 -0600 Subject: [PATCH 2/2] ci(docker): build amd64 only for now The arm64 leg runs under QEMU emulation and is slow/flaky with the heavier dependency tree. The Dockerfile stays multi-arch ready; re-enable by restoring the platforms line. Co-Authored-By: Claude Fable 5 --- .github/workflows/docker-build-push.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index 59b1a6c..0d6cdfb 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -70,7 +70,10 @@ jobs: with: context: . push: true - platforms: linux/amd64,linux/arm64 + # arm64 temporarily disabled: it builds under QEMU emulation, which is slow + # and flaky for the heavy dependency tree. Re-enable by restoring: + # platforms: linux/amd64,linux/arm64 + platforms: linux/amd64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha,scope=${{ github.event.repository.name }}-docker