fix: stabilize Docker builds by standardizing on ARM64 and explicit stage naming (klz-2026 pattern)
Some checks failed
Monorepo Pipeline / 🧪 Quality Assurance (push) Successful in 2m42s
Monorepo Pipeline / 🚀 Release (push) Successful in 2m29s
Monorepo Pipeline / 🐳 Build & Push Images (push) Failing after 4m9s

This commit is contained in:
2026-02-04 18:13:54 +01:00
parent 0ccb15a929
commit e7cc1c8ca5
4 changed files with 17 additions and 11 deletions

View File

@@ -1,10 +1,9 @@
FROM node:20-alpine AS base
# Step 1: Builder stage
FROM node:20-alpine AS builder
RUN apk add --no-cache libc6-compat curl
WORKDIR /app
RUN corepack enable pnpm
# Step 2: Builder stage
FROM base AS builder
# Copy source (honoring .dockerignore)
COPY . .
@@ -17,8 +16,9 @@ RUN --mount=type=cache,target=/root/.local/share/pnpm/store/v3 \
# Build Gatekeeper
RUN pnpm --filter @mintel/gatekeeper build
# Step 3: Runner stage
FROM base AS runner
# Step 2: Runner stage
FROM node:20-alpine AS runner
RUN apk add --no-cache libc6-compat curl
WORKDIR /app
ENV NODE_ENV=production
RUN addgroup --system --gid 1001 nodejs

View File

@@ -1,5 +1,5 @@
# Step 1: Base image
FROM node:20-alpine AS base
# Step 1: Builder image
FROM node:20-alpine AS builder
RUN apk add --no-cache libc6-compat curl
WORKDIR /app
RUN corepack enable pnpm

View File

@@ -194,7 +194,9 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
file: packages/infra/docker/Dockerfile.nextjs
platforms: linux/arm64
pull: true
build-args: |
NEXT_PUBLIC_BASE_URL=${{ needs.prepare.outputs.next_public_base_url }}
NEXT_PUBLIC_TARGET=${{ needs.prepare.outputs.target }}