Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading