Error Knowledge Base Docker id_not_found

Error response from daemon: id not found

Docker could not find the referenced container, image, network, or volume ID, usually because it was deleted, mistyped, or belongs to another context.

Fix it fast

Most likely: The command references a container, image, network, or volume ID that does not exist on the Docker daemon you are currently using.

1. Confirm this is your error
Error response from daemon: id not found
2. Check the cause
docker context show
docker ps -a
docker image ls
docker network ls
docker volume ls
3. Apply the safe fix
# Switch to the daemon/context where the object exists, or use the current object's name instead of an old short ID.
docker context ls
docker context use <context-name>

# Then rerun the command with a fresh ID or stable name from docker ps/image/network/volume ls.
4. Verify it works
docker inspect <id-or-name>
docker <resource> ls
Don't use unsafe shortcuts
  • Do not reuse short IDs saved from old logs, old CI jobs, or another Docker context.
  • Do not assume Docker Desktop, WSL, a remote context, and CI all share the same object IDs.
  • Do not script against ephemeral container IDs when a stable container name or label works.

What Docker Could Not Find on This Daemon

Docker could not find the referenced container, image, network, or volume ID, usually because it was deleted, mistyped, or belongs to another context.

Check the current context and object ID

Confirm the active Docker context and host before touching the image name with docker context ls and docker context show, check whether the daemon is reachable from this shell with docker version or docker info and make sure the server section appears, and if you are on Linux, inspect socket ownership and group access directly with ls -la /var/run/docker.sock and groups.

Use the correct object ID or context

List objects on the current daemon and confirm the ID exists, check active context with docker context show, and retry using a name instead of a short ID if possible.

Why This Daemon Cannot Resolve the ID

The object was deleted or never existed on this daemon.

You are talking to a different Docker context/daemon than you think.

Verify the Object Resolves on This Daemon

Re-run the command with the correct ID or name, and confirm the object shows up in the relevant docker <resource> ls output.

Avoid Version and Source Drift

To prevent this, avoid relying on ephemeral IDs across scripts, prefer names and labels, and keep contexts explicit in CI scripts.

How Docker resolves IDs on the current daemon

The Docker CLI is only a client. Most commands talk to the Docker daemon over a local socket or a remote API, and that control plane has to be healthy before Docker can do anything with images, containers, or volumes. When that path is broken, Docker fails immediately because it never gets far enough to inspect the image or run the container command you asked for.

Need help or found a mistake? Contact RepoFlow support for questions.

Join our mailing list