ChandimaPrabath commited on
Commit
632a8c6
·
verified ·
1 Parent(s): fc50642

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -19,15 +19,16 @@ FROM node:20-alpine
19
 
20
  # Create necessary directories with write permissions
21
  WORKDIR /tmp
22
- RUN mkdir -p /tmp/app/.next/cache/images && chown -R node:node /tmp/app/.next/cache/images
23
-
24
- RUN mkdir -p /tmp/app/.next/cache/fetch-cache && chown -R node:node /tmp/app/.next/cache/fetch-cache
25
 
26
  # Copy the Next.js build and node_modules from the builder stage
27
  COPY --from=builder /app /tmp/app
28
 
29
  WORKDIR /tmp/app
30
 
 
 
 
31
  # Install PM2 globally
32
  RUN npm install -g pm2
33
 
 
19
 
20
  # Create necessary directories with write permissions
21
  WORKDIR /tmp
22
+ RUN mkdir -p /tmp/app/.next/cache/images /tmp/app/.next/cache/fetch-cache
 
 
23
 
24
  # Copy the Next.js build and node_modules from the builder stage
25
  COPY --from=builder /app /tmp/app
26
 
27
  WORKDIR /tmp/app
28
 
29
+ # Change ownership of the /tmp/app directory to the node user
30
+ RUN chown -R node:node /tmp/app
31
+
32
  # Install PM2 globally
33
  RUN npm install -g pm2
34