What you're seeing
$ docker run -d --name web nginx
docker: Error response from daemon: Conflict. The container name "/web" is already in use by container "abc123def456".The full pattern is always:
Error response from daemon: <specific message that tells you what's wrong>The specific message is the diagnostic. This guide covers the six variants you'll actually encounter; everything else, the message text is your starting search query.
What's causing this error
The daemon received your command, tried to execute it, hit a problem, and returned the reason. Unlike "Cannot connect to the Docker daemon" (which means the CLI can't reach the daemon at all), this error means the daemon is working fine — your specific request just isn't valid.
The six common variants:
pull access denied for X, repository does not exist or may require 'docker login'— image is private or doesn't existConflict. The container name "/X" is already in use— name collision with a running or stopped containerNo such container: X— referencing a container that's been removed or has a typo'd namedriver failed programming external connectivity on endpoint X: Bind for 0.0.0.0:NNNN failed: port is already allocated— port collision with another process or containerinvalid reference format— image name has invalid characters (uppercase, leading dash, bad tag)OCI runtime create failed: container_linux.go:NNN: starting container process caused: exec: "X": executable file not found in $PATH— yourCMDorENTRYPOINTreferences a binary that isn't in the image
How to fix it
Variant 1: pull access denied
Error response from daemon: pull access denied for myorg/private-app, repository does not exist or may require 'docker login'Either:
- The image name is wrong (typo, wrong org, wrong registry)
- The image is private and you're not authenticated
# Confirm the image exists where you think:
docker search myorg/private-app
# If it's a private registry, log in:
docker login # Docker Hub
docker login ghcr.io # GitHub Container Registry
docker login registry.gitlab.com # GitLab
# Then retry the pullVariant 2: Conflict. The container name is already in use
Error response from daemon: Conflict. The container name "/web" is already in use by container "abc123def456".Either remove the existing container, or use a different name:
# See what's holding the name:
docker ps -a --filter "name=^/web$"
# Remove it (and its data):
docker rm -f web
# Or use a different name on the new container:
docker run -d --name web-new nginxVariant 3: No such container
Error response from daemon: No such container: webEither:
- Typo in the container name/ID
- Container was removed (intentionally or by
docker compose down) - You're connected to a different Docker context
# See what's actually there:
docker ps -a
# Check your active context:
docker context lsIf docker ps -a shows the container exists but with a different name, you've been pointing at the wrong identifier.
Variant 4: driver failed programming external connectivity ... port is already allocated
Error response from daemon: driver failed programming external connectivity on endpoint web (...): Bind for 0.0.0.0:80 failed: port is already allocatedAnother process (probably another container, occasionally a host service) is using that port:
# What's already on the port:
sudo lsof -i :80
# Or:
sudo ss -tlnp | grep :80
# If it's another container:
docker ps --filter "publish=80"
# Stop it, or use a different host port:
docker run -d -p 8080:80 --name web nginxVariant 5: invalid reference format
Error response from daemon: invalid reference formatImage names have strict rules. The usual culprits:
- Uppercase characters:
MyImage:latestis invalid. Usemyimage:latest. - Leading dash or slash:
-imageor/myimageis invalid. - Bad tag:
myimage:(trailing colon, empty tag) is invalid. - Whitespace anywhere — common when a variable wasn't substituted:
docker run my imageinstead ofdocker run myimage.
# Common: you meant to substitute a variable but didn't:
docker run $IMAGE # If $IMAGE is unset, becomes `docker run` with no args
docker run "$IMAGE" # Quote it to surface the empty string
# Or you ran a command with options out of order:
docker run nginx -d # Wrong: -d treated as arg to nginx
docker run -d nginx # RightVariant 6: OCI runtime create failed ... executable file not found in $PATH
Error response from daemon: OCI runtime create failed: ... exec: "myscript.sh": executable file not found in $PATH: unknownYour CMD references a binary that isn't in the image. Three causes:
- The binary path is wrong (
/app/start.shvsstart.sh) - The binary doesn't have execute permission (
chmod +xit beforeCOPY) - The binary is for a different architecture (x86 binary on an ARM image)
# Open the image and check what's actually there:
docker run --rm -it --entrypoint sh myimage:latest
# Inside:
which myscript.sh
ls -l /app/Common edge cases
| Situation | What's actually wrong |
|---|---|
Same Error response from daemon after restarting Docker | The daemon is fine; this isn't a transient issue. Read the specific message after the colon. |
pull access denied for an image you can see on Docker Hub | Rate limited (anonymous pulls have a quota). docker login even with a free account to get higher limits. |
Conflict ... already in use immediately after docker rm | Removal hasn't finished; docker rm -f to force, or wait 1-2s. |
port is already allocated but nothing seems to be using the port | A zombie iptables rule from a crashed container. sudo systemctl restart docker clears it. |
invalid reference format from docker compose | Variable substitution failed in docker-compose.yml — usually an env var that wasn't set. Run docker compose config to see the substituted file. |
executable file not found only on production | Different image arch — Apple Silicon build, x86 server. Build with docker buildx build --platform linux/amd64 .... |
Random other Error response from daemon: ... not listed here | The pattern's the same: the text after the colon is your starting query. Drop it into search verbatim — including the daemon prefix actually helps because it surfaces Docker-specific results. |