Rinze/Dockerfile

16 lines
311 B
Docker
Raw Normal View History

2022-07-24 16:37:50 +00:00
FROM node:16-alpine
2021-05-11 23:22:25 +00:00
# install dependencies
WORKDIR /app
2022-07-24 16:25:35 +00:00
RUN npm install -g pnpm
2021-05-11 23:22:25 +00:00
COPY . .
2022-07-24 16:37:50 +00:00
RUN pnpm install
RUN pnpm build
FROM node:16-alpine
2021-05-11 23:22:25 +00:00
WORKDIR /app
2022-07-24 16:37:50 +00:00
COPY --from=0 /app/build /app
COPY --from=0 /app/package.json /app
COPY --from=0 /app/node_modules /app/node_modules
2021-05-11 23:22:25 +00:00
EXPOSE 3000
2022-07-24 16:37:50 +00:00
CMD ["node","./index.js"]