File size: 390 Bytes
e2db416
 
 
 
5ae1198
 
 
 
 
32a7e1f
e2db416
5ae1198
 
 
 
 
 
 
 
e2db416
 
 
ebcd728
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM node:20-slim

WORKDIR /app

# Copy and install dependencies first
COPY package*.json ./
RUN npm install --legacy-peer-deps

# Copy the rest of the app
COPY . .

# Create .next directory with proper permissions
RUN mkdir -p .next && chmod -R 777 .next

# Ensure node user owns the app
RUN chown -R node:node /app

# Switch to node user
USER node

EXPOSE 3000

CMD ["npm", "run", "dev"]