Answer each one out loud first, then tap it to check yourself against a model answer and the lesson behind it.
A container image packages the application with its runtime and dependencies, so the same image can be run in development, CI and production. It does not guarantee identical behavior if external configuration or services differ.
Read the lesson: Containers: what they are and why they won →A container isolates processes while sharing the host kernel. A virtual machine runs a guest operating system and its own kernel on virtual hardware, so it has a different isolation and resource model.
Read the lesson: Containers: what they are and why they won →Namespaces isolate views such as process IDs, networking, mounts and hostnames. They do not by themselves limit resource consumption; cgroups handle resource accounting and limits.
Read the lesson: Under the hood: namespaces, cgroups and layered filesystems →The container runtime configures cgroups to account for and constrain resources such as memory and CPU. Namespaces affect what the process can see, not how much CPU or memory it can consume.
Read the lesson: Under the hood: namespaces, cgroups and layered filesystems →docker run, which component performs the request after the CLI?juniorThe Docker CLI sends the request to the Docker daemon, which works with containerd and runc to create and start the container. The CLI itself does not create the container process.
Read the lesson: Installing Docker: Desktop, Engine on Linux, and rootless →A user who can control the daemon can often start a container with access to host files and capabilities, which can amount to root-level control. I grant socket access only to trusted users and consider rootless mode where it fits.
Read the lesson: Installing Docker: Desktop, Engine on Linux, and rootless →An image is the packaged, read-only filesystem and default command used to start workloads. A container is a running or stopped instance with its own writable layer and process state.
Read the lesson: Docker basics: images, containers, ports, logs and exec →I use docker logs to read its standard output and error, then docker exec to run a command inside a running container. I use exec for diagnosis, not as a substitute for changing the image or deployment configuration.
Read the lesson: Docker basics: images, containers, ports, logs and exec →I check its publisher, documentation, required configuration, supported tags and security history. For a release I prefer a trusted source and a digest when I need the exact image content to stay fixed.
Read the lesson: Other people's images: databases, tools and runtimes →The application should retry the connection with a bounded backoff or wait on a meaningful readiness check. Container start order alone does not prove that the database is ready to accept queries.
Read the lesson: Other people's images: databases, tools and runtimes →I store database files in a Docker volume or an explicitly managed bind mount rather than only in the container writable layer. I also verify backups and restore procedures because persistence is not the same as backup.
Read the lesson: Keeping data: volumes, bind mounts and backups →I use the database's dump mechanism to create a consistent backup, store it outside the container, and test restoring it into a clean instance. Copying a live data directory alone may not produce a consistent backup.
Read the lesson: Keeping data: volumes, bind mounts and backups →Docker can reuse cached layers when the instruction and its inputs have not changed. I copy stable dependency manifests and install dependencies before frequently changed source so source edits do not invalidate the dependency layer.
Read the lesson: Building images: Dockerfiles, the layer cache and multi-stage builds →It lets one stage compile or prepare the application while a later stage contains only the runtime files it needs. That can reduce the final image and avoid shipping build tools that are not needed at runtime.
Read the lesson: Building images: Dockerfiles, the layer cache and multi-stage builds →I record and deploy the image digest, which identifies the immutable manifest content. A tag is useful for humans but can be moved to a different image later.
Read the lesson: Registries: Docker Hub, GHCR, ECR and tags you can trust →docker push require before it can upload an image to a registry?midThe image needs a registry-qualified name and tag, and the client must be authenticated with permission to write there. I verify the tag points at the intended build before pushing.
Read the lesson: Registries: Docker Hub, GHCR, ECR and tags you can trust →I choose a restart policy appropriate for the service and configure resource limits and logging deliberately. I still inspect exit status and logs; an automatic restart can keep a broken process cycling.
Read the lesson: Running containers well: restart policies, limits, config and Compose →The same image can then move through environments without rebuilding, while configuration remains explicit at runtime. Sensitive values should use an appropriate secret mechanism rather than being baked into image layers.
Read the lesson: Running containers well: restart policies, limits, config and Compose →They can use Docker's embedded DNS to resolve each other by container or service name on that network. This avoids hard-coding container IP addresses that can change when containers are recreated.
Read the lesson: Networking: bridge networks, published ports and container DNS →A container port is where the process listens inside its network namespace. Publishing maps a host port to that container port so clients outside the Docker network can reach it.
Read the lesson: Networking: bridge networks, published ports and container DNS →I identify which findings affect packages in the image and update to a supported, patched base image, then rebuild and scan again. I avoid suppressing findings without a reason and an owner.
Read the lesson: Container security: scanning, non-root, runtime limits and secrets →If the process is compromised, a non-root UID reduces its privileges within the container. I also check file ownership and writable paths so the application still works without broad permissions.
Read the lesson: Container security: scanning, non-root, runtime limits and secrets →I inspect docker system df and list containers, images, volumes and networks to identify what is consuming space and whether it is still needed. I do not prune volumes blindly because they may contain persistent application data.
Read the lesson: The Docker CLI day to day: inspect, filter, format and clean up →A dependency-manifest change usually requires rebuilding the image so the new dependency is installed. A source-only change may be synchronized or trigger a different action, depending on the service's watch rules.
Read the lesson: Developing with Docker: hot reload, debugging, tests and CI →The application should remain in the same tested image, with configuration and secrets supplied at runtime and health behavior defined clearly. The platform-specific deployment and networking configuration will still differ.
Read the lesson: Deploying containers: PaaS, Docker Swarm and Kubernetes →