From f2ff67873548740c985712662b069624c93a7020 Mon Sep 17 00:00:00 2001 From: r-freeman Date: Sun, 19 Feb 2023 21:41:25 +0000 Subject: [PATCH] Updated docker post --- pages/writing/docker-cheat-sheet/index.mdx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/writing/docker-cheat-sheet/index.mdx b/pages/writing/docker-cheat-sheet/index.mdx index 3a1e1e9..fd1cc2c 100644 --- a/pages/writing/docker-cheat-sheet/index.mdx +++ b/pages/writing/docker-cheat-sheet/index.mdx @@ -43,4 +43,8 @@ As a bonus, you can save some additional space using `docker image prune --all`, Sometimes you want to restart all your containers at once, such as after you've pulled the latest images for your containers. -To do this, use `docker restart $(docker ps -q)`, this command instructs Docker to restart all containers using the container ids which are returned from `docker ps -q`. \ No newline at end of file +To do this, use `docker restart $(docker ps -q)`, this command instructs Docker to restart all containers using the container ids which are returned from `docker ps -q`. + +## Stopping all containers + +Need to stop all containers? Simply use `docker stop $(docker ps -q)`. As above, this uses the container ids from `docker ps` to stop each running container. \ No newline at end of file