Files
CASAN/packages/casan-devkit/Dockerfile.harness
T
thanhnvandClaude Opus 4.8 8c20cfde9f feat(packaging): level-based source hub — Core + DevKit packaging, Platform/Enterprise scaffold
Organize CASAN as a reusable source hub with SPLIT releases so downstream adopts only the
level it needs (packaging/levels.json is the single source of truth).

Implemented now:
- Level 1 Core: bin/casan CLI (run/gate/test/verify/reuse/dashboard) + VERSION.
- Level 2 DevKit: packages/casan-devkit (install.sh, Dockerfile.harness, templates:
  project scaffold, domain-pack, gitea-workflow).
- scripts/package-release.sh core|devkit|platform|all-in-one-demo — builds split bundles
  into dist/ (BUNDLE-MANIFEST + SHA256SUMS); platform is stamped PREVIEW/INCOMPLETE;
  enterprise (future) is REFUSED (exit 3, no fake-complete package). Bundles verified:
  extract → bin/casan works, deterministic + domain suites pass, casan reuse VALID.
- docs/packaging: CASAN_PACKAGING_PLAN + ADOPTION + CI + DOMAIN_PACK + GITEA_PACKAGE + DOCKER.

Structure + docs only:
- Level 3 packages/casan-platform (dashboard exists; control-panel/viewers pending).
- Level 4 packages/casan-enterprise (RBAC/tenant/KMS/WORM/approval exist in core; governed
  console pending). No Chat Console/RBAC-console/tenant-console/model-mgmt built in this task.

Harness change (enables extracted bundles to self-resolve): casan-paths.sh + the Python
project_root() walk-ups now accept a second root marker `packages/casan-harness` in addition
to `.specify`, so a freshly-unpacked core/devkit/demo bundle (no `.specify` yet) roots
correctly and creates state on first run. In an adopted repo `.specify` still matches first.
policy-bundle.yaml paths corrected to packages/casan-harness (re-signed). Full gate 64/0/3.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 15:55:37 +09:00

26 lines
1.0 KiB
Docker

# CASAN harness runtime image (Level 1/2). Runs the governance gate on a mounted repo.
# Minimal: bash + python3 + openssl (+ git for repo-root marker). No app runtime.
#
# Build (from source hub or an extracted casan-devkit bundle):
# docker build -f packages/casan-devkit/Dockerfile.harness -t casan-harness:1.0.0 .
# Run the gate against a project mounted at /workspace:
# docker run --rm -v "$PWD":/workspace -w /workspace casan-harness:1.0.0 casan gate
FROM debian:bookworm-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends bash python3 openssl git ca-certificates rsync \
&& rm -rf /var/lib/apt/lists/*
# Ship the core harness + CLI inside the image.
WORKDIR /opt/casan
COPY packages/casan-harness/ ./packages/casan-harness/
COPY bin/casan ./bin/casan
COPY VERSION ./VERSION
RUN chmod +x ./bin/casan && ln -s /opt/casan/bin/casan /usr/local/bin/casan
# Default working dir is the mounted project.
WORKDIR /workspace
ENV CASAN_HARNESS_ROOT=/opt/casan/packages/casan-harness
ENTRYPOINT ["casan"]
CMD ["help"]