Container operations
Use the available container runtime for reproducible builds, local stacks, diagnostics, and deployment validation.
Workflow
- Detect the available runtime and inspect the repository's container and Compose files before running commands.
- Validate configuration, resolved environment, mounts, ports, health checks, and dependency ordering.
- Build with explicit tags and capture build failures from the first relevant error.
- Start the smallest required service set and wait on health rather than process existence.
- Inspect service status, bounded logs, resource usage, networks, and volumes when diagnosing failures.
- Exercise the exposed application endpoint and stop temporary resources when validation is complete.
Safety
- Confirm before pruning global images, builders, volumes, or networks.
- Never print secret environment values or copy credential files into an image.
- Prefer project-scoped cleanup over global cleanup.
- Preserve persistent volumes unless the user explicitly requests deletion.