The 'container is paused' error occurs when you try to perform operations on a Docker container that has been suspended using the pause command. Simply unpause the container with 'docker unpause' to resume normal operations.
This error occurs when you attempt to interact with a Docker container that is currently in a paused state. The full error message typically reads: "Error response from daemon: container is paused" or variations like "Container is paused, unpause the container before exec". When a container is paused, Docker uses the Linux cgroups freezer to suspend all processes inside the container. Unlike stopping a container (which sends SIGTERM/SIGKILL signals), pausing freezes processes in place - they remain in memory with all their state preserved, but receive no CPU time and cannot execute any instructions. This state is useful for temporarily suspending workloads without losing state, but it prevents most container operations including exec, stop, restart, and attach until the container is unpaused.
First, verify that the container is actually in a paused state:
docker psLook for your container in the output. A paused container will show a status like:
CONTAINER ID IMAGE STATUS NAMES
abc123def456 nginx Up 10 minutes (Paused) my_containerYou can also inspect the container directly:
docker inspect <container_name_or_id> --format='{{.State.Paused}}'If this returns true, the container is paused.
To resume a paused container, use the docker unpause command:
docker unpause <container_name_or_id>If successful, the command completes silently. Verify the container is running normally:
docker psThe status should now show "Up X minutes" without the "(Paused)" indicator.
If you have multiple paused containers, you can unpause them all at once:
# Unpause specific containers
docker unpause container1 container2 container3
# Unpause all paused containers
docker unpause $(docker ps -q --filter "status=paused")For Docker Compose services:
# Unpause all services in the compose project
docker compose unpause
# Unpause a specific service
docker compose unpause <service_name>After unpausing, you can perform the operation that previously failed:
# Execute a command inside the container
docker exec -it <container_name_or_id> /bin/bash
# Stop the container
docker stop <container_name_or_id>
# Restart the container
docker restart <container_name_or_id>All container operations should now work normally.
Understanding pause vs stop: The docker pause command uses the Linux cgroups freezer subsystem to suspend all processes in a container. This is fundamentally different from docker stop:
| Aspect | docker pause | docker stop |
|--------|--------------|-------------|
| Signal | SIGSTOP (via cgroups) | SIGTERM, then SIGKILL |
| Memory | Preserved | Released |
| State | Frozen in place | Process terminates |
| Resume | Instant (unpause) | Full restart required |
| Network | Connections remain open (but inactive) | Connections closed |
When pausing is useful:
- Temporarily freeing CPU for other tasks while preserving state
- Debugging - freeze a container to inspect its state
- Load balancing - pause containers to shift traffic
- Resource management during peak periods
Paused containers don't survive reboots: Unlike stopped containers which can be started after a system restart, paused containers will be stopped (not paused) after a Docker daemon or system restart. The pause state exists only in memory.
Docker Desktop behavior: On Docker Desktop (Mac/Windows), pausing Docker Desktop itself pauses all containers. Check the Docker Desktop icon in your system tray - if it shows Docker is paused, resume Docker Desktop rather than individual containers.
Monitoring paused containers: You can list only paused containers with:
docker ps --filter "status=paused"Health checks and paused containers: Container health checks do not run while a container is paused. The health status remains at whatever it was before pausing.
dockerfile parse error line 5: unknown instruction: RRUN
How to fix 'unknown instruction' Dockerfile parse error in Docker
Error response from daemon: manifest for nginx:nonexistent not found: manifest unknown: manifest unknown
How to fix 'manifest for image:tag not found' in Docker
Error response from daemon: invalid reference format: repository name must be lowercase
How to fix 'repository name must be lowercase' in Docker
Error response from daemon: No such image
How to fix 'No such image' in Docker
Error response from daemon: Container is not running
How to fix 'Container is not running' when using docker exec