ardurai/god-skill-suite/god-containers-advanced
Claude Code and agent skill by ardurai/god-skill-suite
- community
Checking that the SKILL.md file is still in the repository.
God-level container engineering skill going far beyond basic Docker. Covers OCI specification (image spec, runtime spec, distribution spec), Docker internals (layers, union filesystems, copy-on-write), BuildKit (cache mounts, secret mounts, SSH mounts, multi-platform builds), rootless containers, container runtime alternatives (containerd, CRI-O, gVisor, Kata Containers), image optimization (multi-stage, distroless, scratch base), container security (seccomp, AppArmor, capabilities, rootless, image signing with cosign), Docker Compose for local development, and the truth that a container is just a process with namespaces and cgroups — understanding Linux is understanding containers.
Install
npx vskill@latest install ardurai/god-skill-suite/god-containers-advancedSKILL.md
The same SKILL.md was published earlier as ardurai/god-skill-suite/god-containers-advanced.
god-containers-advanced — Deep Container Engineering Skill
Personality & Operating Principles
You are a container platform engineer who has debugged layer cache misses at 3am, written custom seccomp profiles for hardened workloads, and optimized images from 2GB to 8MB. You understand containers at the Linux kernel level — namespaces, cgroups, OverlayFS — not just as Docker abstractions. You care about build reproducibility, supply chain security, and runtime isolation.
Anti-hallucination rules:
- Never invent BuildKit syntax. The
--mount=type=cache,--mount=type=secret, and--mount=type=sshsyntax is verified; always recommend checking current Dockerfile reference at docs.docker.com/engine/reference/builder. - Distroless image names (e.g.,
gcr.io/distroless/static-debian12) change with releases — instruct users to check the current Chainguard/Google Distroless GitHub repo. - gVisor (
runsc) and Kata Containers support vary by Kubernetes distribution and version. Flag when recommending them. - Don't invent OCI specification version numbers — reference the opencontainers.org specs.
- seccomp profile syscall lists differ by Docker version. Direct users to the official Docker seccomp default profile on GitHub.
1. The Foundational Truth
A container is a process. Not a VM, not a mini-OS. A process with:
- Namespaces for isolation (PID, network, mount, UTS, IPC, user)
- Cgroups for resource limits (CPU, memory, I/O)
- OverlayFS (or another union filesystem) for the layered filesystem view
- Capabilities dropped to minimize privilege
- Seccomp to restrict syscall surface
Prove it: docker run -d nginx → ps aux | grep nginx → you'll see nginx processes directly in the host process list with different PIDs than inside the container. cat /proc/<nginx_pid>/cgroup shows the Docker cgroup hierarchy.
2. OCI Specifications
The Open Container Initiative (OCI) defines standards that all compliant runtimes and tools share. Docker, containerd, Podman, CRI-O all implement these.
Image Specification
An OCI image consists of:
- Manifest: JSON document listing config blob + layer blobs by digest (sha256)
- Config: JSON with entrypoint, env vars, working dir, exposed ports, labels, history
- Layers: Ordered sequence of tar archives (each = filesystem diff). Applied bottom-up.
- Index (Image Index): Manifest of manifests for multi-architecture images — each platform entry points to its own manifest
Runtime Specification
The OCI runtime spec defines config.json — the bundle a runtime (runC) receives:
root.path: rootfs directoryprocess: args, env, cwd, capabilities, rlimits, seccompmounts: additional bind mountslinux.namespaces: which namespaces to createlinux.cgroupsPath: cgroup pathlinux.seccomp: syscall filter profile
Distribution Specification
Defines the HTTP API for push/pull from registries:
GET /v2/<name>/manifests/<reference>— pull manifestPUT /v2/<name>/manifests/<reference>— push manifestPOST /v2/<name>/blobs/uploads/— initiate blob upload
Why care?: Understanding this lets you interact with registries directly via curl, implement custom registry middleware, or debug push/pull failures.
3. Union Filesystems — OverlayFS
OverlayFS presents a merged view of multiple directories:
Copy-on-write semantics:
- Container reads a file → served from lowerdir directly (no copy)
- Container writes a file that exists in lowerdir → kernel copies file to upperdir, then writes there
- Container deletes a file from lowerdir → creates a "whiteout" file in upperdir (special char device)
- Container creates new file → goes directly to upperdir
Layer ordering for cache efficiency — critical for build performance:
Inspect actual overlay mounts:
4. BuildKit Deep Dive
BuildKit is the current default Docker build backend (enabled by default in Docker 23.0+). It provides parallelism, better caching, and advanced mount types.
Enable BuildKit (older Docker)
Cache Mounts — Preserve Package Manager Caches
`sharing` modes: shared (default, concurrent access), locked (exclusive), private (new cache per build).
Secret Mounts — Credentials During Build
BuildKit Cache Export/Import
5. Multi-Stage Builds
Multi-stage builds are the standard pattern for producing small production images:
6. Image Optimization
Base Image Comparison
| Base | Size | Shell | Package Mgr | Use Case | |
|---|---|---|---|---|---|
| ubuntu:24.04 | ~80MB | bash | apt | Debug, general | |
| debian:slim | ~75MB | bash | apt | General apps | |
| alpine:3.19 | ~7MB | ash | apk | Small images (musl libc — verify compat) | |
| gcr.io/distroless/base | ~20MB | None | None | JVM, Python, Node production | |
| gcr.io/distroless/static | ~2MB | None | None | Statically compiled Go/Rust | |
| scratch | 0 | None | None | Statically linked binary only | |
| cgr.dev/chainguard/static | ~2MB | None | None | Wolfi-based, daily updates |
Distroless advantages: No shell means no shell injection. No package manager means no apt privilege escalation. Smaller attack surface = smaller CVE surface. Images are still OCI-compliant.
Alpine warning: musl libc behaves differently from glibc. Some C extensions, DNS behavior (musl has single-threaded DNS resolution by default), and stack sizes differ. Test thoroughly before adopting for critical workloads.
Layer Optimization Tricks
7. Multi-Architecture Builds
Native builders: For better performance (especially ARM), use actual ARM hardware or cloud instances as buildx nodes instead of QEMU emulation:
8. Rootless Containers
Running Docker/Podman without root privileges uses user namespace mapping: the root user inside the container (UID 0) maps to an unprivileged host user (e.g., UID 100000).
Limitations of rootless:
- Cannot bind ports < 1024 (requires
net.ipv4.ip_unprivileged_port_start=0sysctl or use a reverse proxy) - OverlayFS may not be available without kernel 5.11+ or fuse-overlayfs fallback
- Network performance slightly lower (slirp4netns vs native networking)
- Cannot set cgroup limits without cgroup v2 + systemd delegation
9. Container Runtime Landscape
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 98 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/god-containers-advanced/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ardurai/god-skill-suite/god-containers-advanced)