● Zion Boggan
repos/Sightline/frontend/Dockerfile
zionboggan.com ↗
20 lines · text
History for this file →
1
FROM node:20-slim AS deps
2
WORKDIR /app
3
COPY package.json ./
4
RUN npm install
5
 
6
FROM node:20-slim AS builder
7
WORKDIR /app
8
COPY --from=deps /app/node_modules ./node_modules
9
COPY . .
10
RUN npm run build
11
 
12
FROM node:20-slim AS runner
13
WORKDIR /app
14
ENV NODE_ENV=production
15
COPY --from=builder /app/.next ./.next
16
COPY --from=builder /app/node_modules ./node_modules
17
COPY --from=builder /app/package.json ./package.json
18
COPY --from=builder /app/public ./public
19
EXPOSE 3000
20
CMD ["npm", "start"]