container: A running (or stopped) instance of an image — an isolated process with its own filesystem, network, and process tree. A container is a running instance of an image. It is an isolated process with its own file system, network and process list, sharing the host's operating system kernel. The image is the blueprint; the container is what runs. You can start many containers from one image, each with its own state. docker ps lists running containers and docker ps -a includes stopped ones.
Treat containers as disposable. Anything written inside a container is lost when it is removed, unless it goes to a volume. That is a feature: you can replace a container with a fresh one at any time, which makes updates and scaling straightforward. Keep data in volumes or external services, and configuration in environment variables, so the container itself holds nothing you would miss.
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.