# Local testing image for the Strapi CMS — runs `strapi develop` with the # workspace's own lockfile, so it matches what `pnpm --filter cms develop` # does on the host. Not for production (see Dockerfile for that). # # Build context must be the repo root (pnpm workspace root), e.g.: # docker build -f apps/cms/Dockerfile.dev -t andwati-cms-dev . # or simply: docker compose up cms FROM node:24-bookworm-slim # better-sqlite3 needs to compile if no prebuilt binary matches the platform. RUN apt-get update && apt-get install -y --no-install-recommends \ python3 make g++ \ && rm -rf /var/lib/apt/lists/* RUN corepack enable WORKDIR /app # Copy just the manifests first so `pnpm install` is cached across rebuilds # unless a package.json actually changes. COPY pnpm-workspace.yaml pnpm-lock.yaml package.json ./ COPY apps/site/package.json apps/site/package.json COPY apps/cms/package.json apps/cms/package.json RUN pnpm install --frozen-lockfile --filter cms COPY apps/cms apps/cms WORKDIR /app/apps/cms EXPOSE 1337 CMD ["pnpm", "develop"]