Shallie/Dockerfile
2022-07-24 03:52:23 +07:00

24 lines
336 B
Docker

FROM node:16
# install dependencies
WORKDIR /app
COPY package.json package-lock.json ./
RUN pnpm install
# Copy all local files into the image.
COPY . .
RUN pnpm build
###
# Only copy over the Node pieces we need
# ~> Saves 35MB
###
FROM node:16-slim
WORKDIR /app
COPY --from=0 /app/build .
EXPOSE 3000
CMD ["node", "./index.js"]