# Builds the repository's module template and packages it with the canonical Ekklesia packager # (`@ekklesia/module-pack`, ADR 0049), in a clean container from a clean copy of the checkout. The # deploy smoke test uses it because a CI job that drives Docker has no Node.js of its own. The # packaging itself is exactly what a module's CI runs; this file only provides the environment. # # DOCKER_BUILDKIT=1 docker build --file scripts/lib/build-module-package.Dockerfile \ # --build-arg SOURCE_REVISION= --output type=local,dest= . # # writes /example--any.tar.gz and its .sha256 line. No image is produced. # # The same pinned Node.js base as deploy/Dockerfile, so the package is built by the runtime it is # installed into. FROM node:24.18.0-trixie-slim@sha256:ae91dcc111a68c9d2d81ff2a17bda61be126426176fde6fe7d08ab13b7f50573 AS build ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0 \ PNPM_HOME=/pnpm \ TURBO_TELEMETRY_DISABLED=1 \ DO_NOT_TRACK=1 WORKDIR /opt/source COPY package.json ./ RUN corepack enable && corepack install COPY . . RUN --mount=type=cache,id=ekklesia-pnpm-store,target=/pnpm/store \ pnpm install --frozen-lockfile --store-dir /pnpm/store RUN pnpm exec turbo run build --filter=@ekklesia/module-template --filter=@ekklesia/module-pack ARG SOURCE_REVISION RUN test -n "$SOURCE_REVISION" && \ node packages/module-pack/bin/ekklesia-pack-module.mjs --module templates/module --target any \ --out /package --license-file LICENSE --source-revision "$SOURCE_REVISION" FROM scratch AS package COPY --from=build /package/ /