docker
Installation
SKILL.md
When to Use
- Writing or reviewing a Dockerfile
- Setting up compose for dev/test/prod
- Optimizing image size or build time
- Container security, networking, or volume management
- Containerizing a Spring Boot application
Engine agnosticism
Everything in this skill is spec OCI: the Dockerfile, the multi-stage build, the Compose spec files, and the feature flags shown run unchanged on Docker or Podman. The examples use docker CLI; substitute podman or lean on the podman-docker shim where it exists.
- Dockerfile semantics: Docker (BuildKit) ≈ Podman (Buildah). No
docker-only Dockerfile instructions are used here. - Compose: prefer the Compose spec files (
compose.yaml) and a Compose v2 client.docker compose(v2.22+) works against a Podman socket viaDOCKER_HOST;podman-composeimplements less of the spec (notably nowatch). - Image scanning:
trivyis the engine-neutral default (next section). - Image versions in the examples below are illustrative (e.g.
postgres:16-alpine); the production version is a project decision recorded in the project docs, not a rule of this skill.