The perry/container and perry/compose modules manage OCI containers
and multi-container stacks directly from Perry programs — same model as
docker compose up, but with the spec as a TS object literal and the
orchestration engine running natively in-process (no shell-out to
docker-compose).
For the full container subsystem documentation see the dedicated Containers section:
- Overview — module layout, backend auto-detection, and the canonical lifecycle pattern.
- Single-Container Lifecycle —
perry/container:run,inspect,logs,exec, image management. - Compose Orchestration —
perry/compose:up,down,ps, healthcheck-gateddepends_on, env-var interpolation. - Networking — internal-only networks, port maps, and the cross-service-DNS workaround.
- Volumes — named vs. bind mounts and
preservation semantics on
down(). - Security — capability isolation, cosign image verification, workload-graph policy tiers.
- Production Patterns — full Forgejo deployment case study with the patterns it surfaced.
{{#include ../../examples/stdlib/container/snippets.ts:compose-up-simple}}{{#include ../../examples/stdlib/container/snippets.ts:compose-down}}See the linked pages above for the full API surface, production patterns, and case studies.