perf: optimize docker build contexts and memory footprint

This commit is contained in:
Vishva
2026-08-04 10:57:17 +05:30
parent 87460cfb0f
commit e325d990a7
3 changed files with 7 additions and 7 deletions
+4
View File
@@ -2,8 +2,12 @@ node_modules
dist
.git
.gitignore
.env
.env.local
.tmp
*.log
docker-compose*.yml
Dockerfile*
strapi-cms
server/uploads
server/data
+2 -3
View File
@@ -1,8 +1,7 @@
node_modules
dist
.git
.gitignore
.tmp
.cache
build
public/uploads
*.log
Dockerfile
+1 -4
View File
@@ -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 . .