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
All the docker:
start | restart | stop | rm --force | kill
commands
may not work if the container is stuck. You can always restart the docker daemon. However, if you have other containers running, that may not be the option. What you can do is:
ps aux | grep <> | awk '{print $1 $2}'
The output contains:
<><>
Then kill the process associated with the container like so:
sudo kill -9 <>
That will kill the container and you can start a new container with the right image.