fazeel007 commited on
Commit
44f76b8
·
1 Parent(s): 7c012de

Fix dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -2
Dockerfile CHANGED
@@ -15,8 +15,8 @@ RUN apk add --no-cache \
15
  # Copy package files
16
  COPY package*.json ./
17
 
18
- # Install dependencies
19
- RUN npm ci --only=production
20
 
21
  # Copy source code
22
  COPY . .
@@ -24,6 +24,9 @@ COPY . .
24
  # Build the application
25
  RUN npm run build
26
 
 
 
 
27
  # Create non-root user for security
28
  RUN addgroup -g 1001 -S nodejs && \
29
  adduser -S nextjs -u 1001
 
15
  # Copy package files
16
  COPY package*.json ./
17
 
18
+ # Install dependencies (including dev dependencies for build)
19
+ RUN npm ci
20
 
21
  # Copy source code
22
  COPY . .
 
24
  # Build the application
25
  RUN npm run build
26
 
27
+ # Clean up dev dependencies after build
28
+ RUN npm prune --production
29
+
30
  # Create non-root user for security
31
  RUN addgroup -g 1001 -S nodejs && \
32
  adduser -S nextjs -u 1001