perf: optimize docker build contexts and memory footprint
This commit is contained in:
@@ -1,13 +1,10 @@
|
||||
FROM node:20-alpine
|
||||
|
||||
# Install native build tools for packages like better-sqlite3 / pg
|
||||
RUN apk add --no-cache python3 make g++ gcc libc-dev
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files and install dependencies
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
RUN npm install --omit=dev --legacy-peer-deps || npm install
|
||||
|
||||
# Copy rest of Strapi CMS source code
|
||||
COPY . .
|
||||
|
||||
Reference in New Issue
Block a user