How to stop a docker container which started with `--restart=always`

Is there any way to stop a docker container which started with --restart=always like following

sudo docker run -it --restart=always <image_id>


Here's the mighty eagle that docker has recently included. :D

You can update docker container.

use sudo docker update --restart=no <container_id> to update --restart flag of the container.

Now you can stop the container.


You should be able to just use docker stop and then docker rm to make sure the container doesn't restart when the daemon restarts.

Your question is an issue on the docker github and someone has made some comments about to how to solve here

I'm not sure if it's intended behavior to restart a stopped container on daemon restart... but for sure docker rm would be all that is needed, no need to remove the image.