wynn/ts/Dockerfile
a 067432eda9
All checks were successful
commit-tag / commit-tag-image (push) Successful in 6m49s
noot
2025-03-01 15:34:38 -06:00

23 lines
449 B
Docker

FROM node:23 AS builder
WORKDIR /build
COPY package.json yarn.lock .yarnrc.yml .
RUN corepack yarn install
FROM node:23
RUN npm i -g tsx
USER 1000:1000
WORKDIR /app
## copy the necessary files after pulling deps
COPY --from=builder /build/node_modules node_modules
COPY tsconfig.json package.json cli .yarnrc.yml yarn.lock .
COPY src src
# make sure it passes compilation before publishing image
RUN corepack yarn tsc
ENTRYPOINT ["/app/cli"]