proxyraye-nextjs/Dockerfile

21 lines
272 B
Docker
Raw Permalink Normal View History

2024-05-11 11:13:41 +00:00
# PHASE 1: copy and build
FROM node:alpine AS build
2024-04-27 18:30:38 +00:00
WORKDIR /app
COPY . .
2024-05-11 11:13:41 +00:00
RUN rm -rf node_modules && npm install && npm run build
# PHASE 2: prepare for exec
2024-04-27 18:30:38 +00:00
2024-05-11 11:13:41 +00:00
FROM node:alpine AS exec
WORKDIR /app
2024-04-27 18:30:38 +00:00
2024-05-11 11:13:41 +00:00
COPY --from=build /app/. .
2024-04-27 18:30:38 +00:00
EXPOSE 3000
CMD ["npm", "run", "start"]