digest: A content-addressable SHA256 hash that identifies an exact image, immutably. Unlike a tag, a digest never moves. A digest is a SHA256 hash that identifies one exact Docker image. A reference like myapp@sha256:9b2c... always points to the same image content, byte for byte. Tags are different. myapp:latest or even node:22 can point to a new image tomorrow, after someone pushes an update. That is convenient, but it means the same tag can produce different results over time.
Digests give you certainty. Deploying by digest guarantees production runs exactly the image you tested. Many teams tag images for humans, such as with the commit hash, and let their deploy tooling resolve tags to digests. For base images in a Dockerfile, pinning a digest prevents surprise changes, at the cost of updating it yourself when security fixes come out.
Use this skill when setting up, initializing, or Dockerizing a project, even if the user doesn't explicitly mention Docker but describes a need for containerized local development, adding a database or cache dependency, or running services without host-level installs. Covers Dockerfile, compose.yaml, and .dockerignore creation with Docker best practices.
Use this skill when creating, modifying, or debugging Docker Compose configurations, even if the user just says they need to wire services together, add a database to their stack, or set up a local development environment with multiple containers. Covers service definitions, health checks, dependency ordering, volumes, networks, environment variables, and development overrides.
Use this skill when writing, reviewing, or optimizing Dockerfiles, even if the user just says their image is too large, their build is slow, or they need to harden a container for production. Covers multi-stage builds, layer caching, .dockerignore, non-root users, and image size optimization.