wynn/ts/Dockerfile

23 lines
449 B
Docker
Raw Normal View History

2025-02-27 05:38:10 +00:00
FROM node:23 AS builder
WORKDIR /build
COPY package.json yarn.lock .yarnrc.yml .
RUN corepack yarn install
2025-02-27 03:56:30 +00:00
FROM node:23
RUN npm i -g tsx
2025-03-01 21:28:11 +00:00
USER 1000:1000
WORKDIR /app
2025-03-01 21:34:38 +00:00
## copy the necessary files after pulling deps
2025-02-27 05:38:10 +00:00
COPY --from=builder /build/node_modules node_modules
2025-03-01 21:28:11 +00:00
COPY tsconfig.json package.json cli .yarnrc.yml yarn.lock .
2025-02-27 05:38:10 +00:00
COPY src src
2025-02-27 03:56:30 +00:00
2025-03-01 21:34:38 +00:00
# make sure it passes compilation before publishing image
2025-03-01 21:17:19 +00:00
RUN corepack yarn tsc
2025-03-01 21:10:31 +00:00
2025-02-27 03:56:30 +00:00
ENTRYPOINT ["/app/cli"]