build arm image (#12)

This commit is contained in:
Doh
2025-01-03 21:02:27 -05:00
committed by GitHub
parent cb02b3831c
commit f031bd1361
5 changed files with 208 additions and 20 deletions

View File

@@ -1,9 +1,9 @@
# syntax=docker.io/docker/dockerfile:1
FROM node:18-alpine AS base
FROM --platform=$BUILDPLATFORM node:18-alpine AS base
# Install dependencies only when needed
FROM base AS deps
FROM --platform=$BUILDPLATFORM base AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
@@ -19,7 +19,7 @@ RUN \
fi
# Rebuild the source code only when needed
FROM base AS builder
FROM --platform=$BUILDPLATFORM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .