containerslisted
Install: claude install-skill xobotyi/cc-foundry
# Containers
Security is not optional. Every container runs non-root, with dropped capabilities, on a minimal base image. Convenience
defaults that weaken security posture are bugs, not trade-offs.
## Security Rules
These are non-negotiable defaults for every container configuration. Apply unconditionally — no exceptions for
development, convenience, or "temporary" setups.
- **Run as non-root.** Add a `USER` instruction with explicit UID/GID. Never run production containers as root.
- **Drop all capabilities.** `--cap-drop=ALL`, then add back only what the application genuinely requires. Most
applications need zero.
- **Enable no-new-privileges.** `--security-opt=no-new-privileges` prevents setuid/setgid escalation.
- **Use read-only filesystem.** `--read-only` with `tmpfs` mounts for `/tmp`, `/run`, and any directories the app writes
to.
- **Never pass secrets via ENV.** Visible in `docker inspect`, logs, and child processes. Use mounted secret files or
Docker secrets.
- **Scan images before deployment.** Use Docker Scout, Trivy, or Grype in CI. Block images with critical CVEs.
- **Use distroless for production** when possible. No shell means no shell-based attacks and dramatically fewer CVEs.
- **Never use `--privileged`.** It removes almost all security restrictions. If a workload claims to need it, decompose
the requirement into specific capabilities.
- **Never mount the Docker socket** (`/var/run/docker.sock`) into containers. It grants root-equivalent contro