Description
"docker rm -f" does not remove the container but cause error:
Error response from daemon: Could not kill running container 0859eb46e6f5e76161b06f12678bd95c1b55dde8c6f4645ca660faa6da201450, cannot remove - Container 0859eb46e6f5e76161b06f12678bd95c1b55dde8c6f4645ca660faa6da201450 is paused. Unpause the container before stopping
Yes, I can "unpause" before killing the container. But, it is quite nice if "docker rm -f" is the final command to remove the container. Also, strictly speaking, even if I call "docker unpause" just before "docker rm -f", Someone may "unpause" the container between those commands.
Steps to reproduce the issue:
- Run a container.
# docker run -d ubuntu sleep 1000
acf0571d8fdc581a61428b7e9312b12f378d4d649a55cd6e0c199c597a53596e
- Pause the container
# docker pause acf0571d8fdc581a61428b7e9312b12f378d4d649a55cd6e0c199c597a53596e
acf0571d8fdc581a61428b7e9312b12f378d4d649a55cd6e0c199c597a53596e
- Remove the container
# docker rm -f acf0571d8fdc581a61428b7e9312b12f378d4d649a55cd6e0c199c597a53596e
Error response from daemon: Could not kill running container acf0571d8fdc581a61428b7e9312b12f378d4d649a55cd6e0c199c597a53596e, cannot remove - Container acf0571d8fdc581a61428b7e9312b12f378d4d649a55cd6e0c199c597a53596e is paused. Unpause the container before stopping
Describe the results you received:
Error message:
Error response from daemon: Could not kill running container acf0571d8fdc581a61428b7e9312b12f378d4d649a55cd6e0c199c597a53596e, cannot remove - Container acf0571d8fdc581a61428b7e9312b12f378d4d649a55cd6e0c199c597a53596e is paused. Unpause the container before stopping
Describe the results you expected:
Removing the container
Output of docker version:
Client:
Version: 1.12.2
API version: 1.24
Go version: go1.6.3
Git commit: bb80604
Built: Tue Oct 11 18:29:41 2016
OS/Arch: linux/amd64
Server:
Version: 1.12.2
API version: 1.24
Go version: go1.6.3
Git commit: bb80604
Built: Tue Oct 11 18:29:41 2016
OS/Arch: linux/amd64
Output of docker info:
Containers: 16
Running: 13
Paused: 1
Stopped: 2
Images: 4
Server Version: 1.12.2
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 150
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor seccomp
Kernel Version: 4.4.0-43-generic
Operating System: Ubuntu 16.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.858 GiB
Name: paizaterm-prod4
ID: 757W:AQM2:WNUV:CQSJ:URNH:5I5W:65OW:4DXQ:QYLV:M57U:P5AG:WBAV
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Labels:
provider=generic
Insecure Registries:
127.0.0.0/8
Additional environment details (AWS, VirtualBox, physical, etc.):
AWS
Description
"docker rm -f" does not remove the container but cause error:
Yes, I can "unpause" before killing the container. But, it is quite nice if "docker rm -f" is the final command to remove the container. Also, strictly speaking, even if I call "docker unpause" just before "docker rm -f", Someone may "unpause" the container between those commands.
Steps to reproduce the issue:
Describe the results you received:
Error message:
Describe the results you expected:
Removing the container
Output of
docker version:Output of
docker info:Additional environment details (AWS, VirtualBox, physical, etc.):
AWS