Rinze/Dockerfile

26 lines
357 B
Docker
Raw Normal View History

2021-05-12 06:22:25 +07:00
FROM node:14
# install dependencies
WORKDIR /app
2022-07-24 23:25:35 +07:00
RUN npm install -g pnpm
COPY package.json pnpm-lock.yaml ./
RUN pnpm install
2021-05-12 06:22:25 +07:00
# Copy all local files into the image.
COPY . .
RUN yarn build
###
# Only copy over the Node pieces we need
# ~> Saves 35MB
###
FROM node:14-slim
WORKDIR /app
COPY --from=0 /app .
COPY . .
EXPOSE 3000
CMD ["node", "./build"]