When trying to stop or restart a docker container I\'m getting the following error message:
$ docker restart 5ba0a86f36ea
Error response from daemon: Cannot rest
in my case, i couldn't delete container created with nomad jobs,
there's no output for the docker logs <ContainerID>
and, in general, it looks like frozen.
until now the solution is: sudo service docker restart
, may someone suggest better one?
I couldn't locate boot2docker
in my machine. So, I came up with something that worked for me.
$ sudo systemctl restart docker.socket docker.service
$ docker rm -f <container id>
Check if it helps you as well.
Check if there is any zombie process using "top" command.
docker ps | grep <<container name>>
Get the container id.
ps -ef | grep <<container id>>
ps -ef|grep defunct | grep java
And kill the container by Parent PID .
Enjoy
sudo aa-remove-unknown
This is what worked for me.