docker Errors
18 error patterns
Docker filesystem no space
Docker.*failed to create.*overlay|filesystem.*no space
- •Run docker system prune
- •Increase disk allocation for Docker
Docker exec into container failed
Docker.*OCI runtime.*exec failed|container.*cannot exec
- •Verify container is running
- •Check exec command exists in image
Docker build COPY file not found
Docker.*build.*COPY failed.*no such file
- •Check .dockerignore isn't excluding file
- •Verify path relative to build context
Docker network endpoint conflict
Docker.*network.*endpoint.*already has an interface
- •Disconnect container from network first
- •Use docker network prune
Docker multi-stage build target not found
Docker.*multi-stage.*target.*not found
- •Verify --target matches stage name
- •Check FROM ... AS name spelling
Docker layer not found in registry
Docker.*layer.*not found.*manifest
- •Re-push base image to registry
- •Use docker pull to refresh local cache
Docker Compose depends_on health check failing
Docker.*compose.*service.*depends_on.*unhealthy
- •Add healthcheck to dependency service
- •Use condition: service_healthy
Docker ENTRYPOINT executable not found
Docker.*ENTRYPOINT.*exec.*not found
- •Use full path to executable
- •Verify binary exists in image
Docker build ARG not defined
Docker.*ARG.*not defined.*build-arg
- •Declare ARG in Dockerfile before use
- •Pass --build-arg NAME=value
Docker secret mount permission denied
Docker.*secrets.*mount.*permission denied
- •Set uid/gid on secret mount
- •Run as correct user for secret access
Docker healthcheck failing during startup
Docker.*healthcheck.*starting.*interval.*container unhealthy
- •Increase --start-period duration
- •Use --start-interval for initial checks
Port already allocated
Bind for 0\.0\.0\.0:\d+ failed: port is already allocated
- •Stop the container or process using the port: `docker ps` then `docker stop <id>`
- •Find what's using the port: `netstat -tlnp | grep <port>` or `lsof -i :<port>`
Image not found / pull access denied
pull access denied.*repository does not exist or may require.*docker login
- •Check the image name and tag for typos — verify it exists on the registry
- •Run `docker login` to authenticate with the private registry
Docker daemon permission denied
permission denied while trying to connect to the Docker daemon socket
- •Add your user to the docker group: `sudo usermod -aG docker $USER` then re-login
- •Run with sudo: `sudo docker ...` (not recommended for production)
COPY failed — file not found in build context
COPY failed:.*not found|file not found in build context
- •Ensure the file path is relative to the build context (the directory passed to `docker build`)
- •Check .dockerignore isn't excluding the file you're trying to COPY
Multi-stage COPY --from failed
COPY --from=.+.*not found|invalid from flag value
- •Ensure the stage name matches: `FROM node:18 AS builder` then `COPY --from=builder`
- •Check the source path exists in the builder stage after its RUN commands complete
Docker network / connection issues
dial tcp.*connect: connection refused|Could not resolve host|network .+ not found
- •Use service names (not localhost) for inter-container communication in docker-compose
- •Ensure containers are on the same Docker network: `docker network connect <network> <container>`
Volume mount denied / path error
Error response from daemon.*Mounts denied|error while creating mount source path
- •On Docker Desktop, add the path to Settings → Resources → File Sharing
- •Use absolute paths for volume mounts: `-v /full/path:/container/path`