Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

use node alpine base image

Maidul Islam1c4dd78deaa1
diff --git a/backend/Dockerfile b/backend/Dockerfile
index bbbe2a1a78..06db22b62a 100644
--- a/backend/Dockerfile
+++ b/backend/Dockerfile
@@ -1,21 +1,20 @@
-FROM node:16-bullseye-slim AS build
+# Build stage
+FROM node:16-alpine AS build
WORKDIR /app
-COPY package*.json ./
-RUN npm ci --only-production --ignore-scripts
+COPY package*.json ./
+RUN npm ci --only-production
COPY . .
-
RUN npm run build
-
-
-FROM node:16-bullseye-slim
+# Production stage
+FROM node:16-alpine
WORKDIR /app
-COPY package*.json ./
+COPY package*.json ./
RUN npm ci --only-production
COPY --from=build /app .
@@ -25,4 +24,4 @@ HEALTHCHECK --interval=10s --timeout=3s --start-period=10s \
EXPOSE 4000
-CMD ["npm", "run", "start"]
+CMD ["npm", "run", "start"]
\ No newline at end of file