Save yourself the hassle of restarting your containers individually.
First see which containers are currently running:
docker ps
To restart an individual container you can run:
docker restart <container id>
It can be useful to feed the output of a docker command into another to save the effort and time of running the above, if you know you want to restart all the containers.
Restart all running containers:
docker restart $(docker ps -q)
Happy dockering!
Top comments (3)
docker ps -q | xargs docker restart
is a nice alternative, if you have a lot of containers.
nice!
Thanks,.. post.