dockerfile-templates/typescript.Dockerfile
2023-09-26 20:24:01 +02:00

15 lines
302 B
Docker

FROM node:18 as build
WORKDIR /build/app
COPY package.json tsconfig.json /build/app/
COPY src /build/app/src/
RUN corepack enable
RUN corepack prepare pnpm@latest --activate
RUN pnpm install
RUN pnpm run build
FROM node:18 as run
WORKDIR /app
COPY --from=build /build/app/ /app/
CMD ["node", "dist"]