is not running Docker Origin: Platform & cloud OSI layer 7 · Application Last updated 14 Oct 2026

Error response from daemon: Container X is not running

You tried to exec into or interact with a container that has stopped.

Exact message you may see is not runningContainer is not runningError response from daemon: Container
Seen on: Docker

Meaning

docker exec only works on running containers. The container probably crashed or exited right after start — check its logs and exit code, then start it again or run a new one interactively.

Common causes

  • Container exited (crash or finished CMD)
  • Container stopped manually or by restart policy
  • Container paused/restarting

⚡ Quick fix

  1. docker logs <container> to see why it stopped
  2. docker start <container> then exec
  3. Debug with docker run -it --entrypoint sh image

Detailed fix by platform

Docker

  1. bash
    docker logs --tail 50 web
    docker start web && docker exec -it web sh

How to diagnose

  1. State — docker inspect -f '{{.State.Status}} {{.State.ExitCode}}' web
  2. Logs — Why did it stop?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

ACR unauthorized — Azure Container Registry: unauthorized: authentication required, visit https://aka.ms/acr/authorization (AKS ErrImagePull 401) (Azure)ACR unauthorizedAWS_CA_BUNDLE — AWS CLI/SDK: SSL validation failed for https://... certificate verify failed (custom CA bundle / proxy) (SSL / TLS)AWS_CA_BUNDLECannotPullContainerError — ECS task stopped: CannotPullContainerError: pull image manifest has been retried ... / ref pull has been retried (AWS)CannotPullContainerEr…Conflict container name — Conflict. The container name "/x" is already in use by container … (Docker)Conflict container na…Container failed to start — Cloud Run: The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable (Google Cloud / Firebase)Container failed to s…docker-compose: command not found — docker-compose: command not found / 'compose' is not a docker command (Docker)docker-compose: comma…Essential container in task exited — ECS: Essential container in task exited (task keeps stopping) (AWS)Essential container i…exec no such file or directory — exec /docker-entrypoint.sh: no such file or directory (CRLF line endings / missing interpreter) (Docker)exec no such file or …is not ru…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.