fix Dockerfiles: remove deprecated flags, add .dockerignore
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
.next
|
||||
.git
|
||||
+1
-2
@@ -1,8 +1,7 @@
|
||||
FROM node:22-alpine AS builder
|
||||
RUN npm install -g npm@latest
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci --ignore-scripts --no-audit --no-fund
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
dist
|
||||
.git
|
||||
+2
-5
@@ -1,14 +1,11 @@
|
||||
FROM node:22-alpine AS builder
|
||||
RUN npm install -g npm@latest
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci --ignore-scripts --no-audit --no-fund
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npx prisma generate
|
||||
RUN npm run build
|
||||
RUN npx prisma generate && npm run build
|
||||
|
||||
FROM node:22-alpine AS runner
|
||||
RUN npm install -g npm@latest
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/dist ./dist
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
|
||||
Reference in New Issue
Block a user