448443a024
Bumps the internal/toolchain Node version to the latest 22.x LTS (`22.23.1`) and standardises it across the repo. Scope is the **platform toolchain + the repo's own runtime images** (all `20 → 22` *upgrades*, off the now-EOL node 20). ### Main changes - Node `20.20.2 → 22.23.1` across all CI workflows, `.nvmrc`, `CONTRIBUTING.md`, and the OSS `docker/Dockerfile` (digest-pinned). - `@types/node → 22.20.0` (root dep + pnpm `overrides`, so the whole workspace resolves to it); lockfile regenerated. - `sdk-compat` matrix: adds Node 24 + 26 (keeps 20, still in `engines`). - **App runtime images → node 22** (were on EOL node 20): `apps/coordinator` → `node:22.23.1-bookworm-slim`; `apps/docker-provider` + `apps/kubernetes-provider` → `node:22-alpine` (reusing the exact digest `apps/supervisor` already runs, so all four worker images are now identical). Stage aliases renamed off `node-20`. ### Possible issues / test notes - `@types/node` 22.x can surface new TS errors — typecheck (now on 22) is the gate. - **Smoke-test the v3 worker path** — `coordinator` (`crictl`/CRI calls) and the docker/kubernetes providers (talking to their daemons) now run on node 22 (alpine/musl for the providers). Upgrade off EOL so low-risk, but it's deployed runtime code with its own `publish-worker.yml` pipeline.
48 lines
1.5 KiB
Docker
48 lines
1.5 KiB
Docker
FROM node:22-alpine@sha256:9bef0ef1e268f60627da9ba7d7605e8831d5b56ad07487d24d1aa386336d1944 AS node-22-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
FROM node-22-alpine AS pruner
|
|
|
|
COPY --chown=node:node . .
|
|
RUN npx -q turbo@1.10.9 prune --scope=docker-provider --docker
|
|
RUN find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
|
|
|
|
FROM node-22-alpine AS base
|
|
|
|
RUN apk add --no-cache dumb-init docker
|
|
|
|
COPY --chown=node:node .gitignore .gitignore
|
|
COPY --from=pruner --chown=node:node /app/out/json/ .
|
|
COPY --from=pruner --chown=node:node /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
|
|
COPY --from=pruner --chown=node:node /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
|
|
|
|
FROM base AS dev-deps
|
|
RUN corepack enable
|
|
ENV NODE_ENV development
|
|
|
|
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm fetch --no-frozen-lockfile
|
|
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm install --ignore-scripts --no-frozen-lockfile
|
|
|
|
FROM base AS builder
|
|
RUN corepack enable
|
|
|
|
COPY --from=pruner --chown=node:node /app/out/full/ .
|
|
COPY --from=dev-deps --chown=node:node /app/ .
|
|
COPY --chown=node:node turbo.json turbo.json
|
|
|
|
RUN pnpm run -r --filter @trigger.dev/core bundle-vendor && pnpm run -r --filter docker-provider build:bundle
|
|
|
|
FROM base AS runner
|
|
|
|
RUN corepack enable
|
|
ENV NODE_ENV production
|
|
|
|
COPY --from=builder --chown=node:node /app/apps/docker-provider/dist/index.mjs ./index.mjs
|
|
|
|
EXPOSE 8000
|
|
|
|
USER node
|
|
|
|
CMD [ "/usr/bin/dumb-init", "--", "/usr/local/bin/node", "./index.mjs" ]
|