proxyraye-nextjs/Dockerfile

21 lines
294 B
Docker

# PHASE 1: copy and build
FROM node:22.2.0-alpine3.19 AS build
WORKDIR /app
COPY . .
RUN rm -rf node_modules && npm install && npm run build
# PHASE 2: prepare for exec
FROM node:22.2.0-alpine3.19 AS exec
WORKDIR /app
COPY --from=build /app/. .
EXPOSE 3000
CMD ["npm", "run", "start"]