fix: stabilize Docker builds by standardizing on ARM64 and explicit stage naming (klz-2026 pattern)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user