Created
October 12, 2022 21:45
Node.js Typescript (Yarn) Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:18-alpine as builder | |
WORKDIR /build | |
COPY . . | |
RUN yarn install | |
RUN rm -rf dist/ | |
RUN tsc | |
FROM node:18-alpine | |
WORKDIR /app | |
COPY package*.json ./ | |
COPY yarn.lock ./ | |
COPY --from=builder ./build/dist ./dist | |
RUN yarn install --production | |
CMD yarn start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment