Shallie/Dockerfile

24 lines
336 B
Docker
Raw Normal View History

2022-07-23 20:52:23 +00:00
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"]