Refactor code structure for improved readability and maintainability
This commit is contained in:
+5
-4
@@ -1,15 +1,16 @@
|
||||
FROM node:20-alpine AS builder
|
||||
# syntax=docker/dockerfile:1.7
|
||||
FROM node:20-bookworm-slim AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
RUN --mount=type=cache,target=/root/.npm npm ci --no-audit --no-fund
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
RUN npm prune --omit=dev
|
||||
RUN --mount=type=cache,target=/root/.npm npm prune --omit=dev --no-audit --no-fund
|
||||
|
||||
FROM node:20-alpine
|
||||
FROM node:20-bookworm-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
||||
Reference in New Issue
Block a user