Shallie/Dockerfile

16 lines
311 B
Docker
Raw Normal View History

2022-07-23 22:04:56 +00:00
FROM node:16-alpine
2022-07-23 20:52:23 +00:00
# install dependencies
WORKDIR /app
2022-07-23 22:04:56 +00:00
RUN npm install -g pnpm
2022-07-23 20:52:23 +00:00
COPY . .
2022-07-23 22:04:56 +00:00
RUN pnpm install
2022-07-23 20:52:23 +00:00
RUN pnpm build
2022-07-23 22:04:56 +00:00
FROM node:16-alpine
2022-07-23 20:52:23 +00:00
WORKDIR /app
2022-07-23 22:04:56 +00:00
COPY --from=0 /app/build /app
COPY --from=0 /app/package.json /app
COPY --from=0 /app/node_modules /app/node_modules
2022-07-23 20:52:23 +00:00
EXPOSE 3000
2022-07-23 22:04:56 +00:00
CMD ["node","./index.js"]