Docker CMD vs ENTRYPOINT: The Final Answer
CMD and ENTRYPOINT work together rather than competing. Exec form vs shell form, the full behavior matrix, the combo pattern, and the debug override.
All the articles with the tag "docker".
CMD and ENTRYPOINT work together rather than competing. Exec form vs shell form, the full behavior matrix, the combo pattern, and the debug override.
Profiles let you conditionally start services in Compose. Perfect for dev vs prod service splits without multiple files.
docker system prune reclaims space and can delete volumes you wanted. What each cleanup command removes, how to check usage first, and a safe script.
ENV bakes secrets into image layers that docker history shows to anyone. Use BuildKit secret mounts, runtime variables, or a real secrets manager.
The latest tag does not mean newest, it means whatever was pushed untagged. Why that breaks reproducible deploys and how to pin versions and digests.
Network aliases give a container more than one DNS name on a Docker network. Blue-green and canary deploy patterns, a Compose example, and the limits.
Master Docker HEALTHCHECK syntax. Learn what checks work, how to tune interval/timeout/retries, and integrate with orchestration.
Containers run as root by default, which is a real security problem. The USER instruction, numeric UID/GID, the volume mount gotcha, and distroless bases.
Docker labels are free metadata for filtering, routing, and documentation. Learn label conventions and leverage them with filters and tools.
Docker layer caching explains most slow builds. Why copying files too early kills the cache, the layer ordering that fixes it, and a multi-stage benchmark.
Decode Docker exit codes: 0 (success), 1 (app error), 125/126/127 (Docker errors), 137 (OOM), 143 (SIGTERM). Debug restarts in minutes.
A missing .dockerignore bloats build context, slows every build, and leaks secrets into images. One you can copy-paste, plus how to check context size.