Skip to content

Instantly share code, notes, and snippets.

@d-exclaimation
Created October 12, 2022 21:45

Revisions

  1. d-exclaimation created this gist Oct 12, 2022.
    14 changes: 14 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    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