Docker Error Response from Daemon: How to Fix It

Last updated May 24, 2026

TL;DR

Error response from daemon: ... isn't one error. It's a category. The daemon got your request, processed it, and rejected it with a specific reason. The text after the colon is what actually matters.

The five most common variants and their root causes:

  • pull access denied → not logged in or image is private
  • conflict: container is running → trying to remove/rename a live container
  • No such container → typo in container name, or container already removed
  • driver failed programming external connectivity → port already in use
  • invalid reference format → typo in image name (uppercase, leading slash, bad tag)

Read the part after the colon first, match it to the section below, follow that fix.

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:

  1. pull access denied for X, repository does not exist or may require 'docker login': image is private or doesn't exist
  2. Conflict. The container name "/X" is already in use: name collision with a running or stopped container
  3. No such container: X: referencing a container that's been removed or has a typo'd name
  4. driver 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 container
  5. invalid reference format: image name has invalid characters (uppercase, leading dash, bad tag)
  6. OCI runtime create failed: container_linux.go:NNN: starting container process caused: exec: "X": executable file not found in $PATH: your CMD or ENTRYPOINT references 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 pull

Variant 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 nginx

Variant 3: No such container

Error response from daemon: No such container: web

Either:

  • 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 ls

If 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 allocated

Another 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 nginx

Variant 5: invalid reference format

Error response from daemon: invalid reference format

Image names have strict rules. The usual culprits:

  • Uppercase characters: MyImage:latest is invalid. Use myimage:latest.
  • Leading dash or slash: -image or /myimage is invalid.
  • Bad tag: myimage: (trailing colon, empty tag) is invalid.
  • Whitespace anywhere, common when a variable wasn't substituted: docker run my image instead of docker 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            # Right

Variant 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: unknown

Your CMD references a binary that isn't in the image. Three causes:

  • The binary path is wrong (/app/start.sh vs start.sh)
  • The binary doesn't have execute permission (chmod +x it before COPY)
  • 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

SituationWhat's actually wrong
Same Error response from daemon after restarting DockerThe 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 HubRate limited (anonymous pulls have a quota). docker login even with a free account to get higher limits.
Conflict ... already in use immediately after docker rmRemoval hasn't finished; docker rm -f to force, or wait 1-2s.
port is already allocated but nothing seems to be using the portA zombie iptables rule from a crashed container. sudo systemctl restart docker clears it.
invalid reference format from docker composeVariable 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 productionDifferent image arch: Apple Silicon build, x86 server. Build with docker buildx build --platform linux/amd64 ....
Random other Error response from daemon: ... not listed hereThe 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.

Related errors