diff --git a/devops/Dockerfile.backend b/devops/Dockerfile.backend index 85f5ca2..7702417 100644 --- a/devops/Dockerfile.backend +++ b/devops/Dockerfile.backend @@ -1,11 +1,13 @@ # ── Build stage ────────────────────────────────────────────── -FROM node:20-alpine AS builder +# Use full Debian-based image in builder so native modules (e.g. from +# @solana packages) can compile without extra toolchain installs. +FROM node:20 AS builder WORKDIR /app # Copy workspace manifests first for layer caching -COPY package.json ./ +COPY package.json package-lock.json ./ COPY backend/package.json ./backend/ -RUN npm install --workspace=backend +RUN npm ci --workspace=backend COPY backend ./backend RUN npm -w backend run build diff --git a/devops/Dockerfile.frontend b/devops/Dockerfile.frontend index 5d7465b..a5c941f 100644 --- a/devops/Dockerfile.frontend +++ b/devops/Dockerfile.frontend @@ -1,10 +1,12 @@ # ── Build stage ────────────────────────────────────────────── -FROM node:20-alpine AS builder +# Use full Debian-based image in builder so native modules (e.g. usb via +# @solana/wallet-adapter-wallets) can compile without extra toolchain installs. +FROM node:20 AS builder WORKDIR /app -COPY package.json ./ +COPY package.json package-lock.json ./ COPY frontend/package.json ./frontend/ -RUN npm install --workspace=frontend +RUN npm ci --workspace=frontend COPY frontend ./frontend RUN npm -w frontend run build