Ravindra BagaleCourses & study guides

Chapter 6: Docker Images and Containers

6.8 Troubleshooting table (first week)

Symptom Likely cause What to try
docker: command not found Docker not installed / not on PATH Install per OS or Desktop; reopen terminal
Build context huge / slow Missing .dockerignore Ignore .git, deps, logs
Container exits immediately App crash / wrong CMD docker logs <name>
curl to host port fails No -p, or app bound to 127.0.0.1 only Add -p; listen on 0.0.0.0
port is already allocated Another process uses host port ss -tlnp / choose another host port
Permission errors on COPY files Build context paths wrong Check paths relative to Dockerfile directory

Practice task

Pick two rows from the table. For each, write the exact command you would run first on your laptop.