From 4d121cfb0f4ae6c83b3b0968e340e07d5ce08dcb Mon Sep 17 00:00:00 2001 From: James King Date: Mon, 21 Oct 2019 09:24:33 +0100 Subject: [PATCH] Remove the containers once you exit Exiting after using `docker run` leaves behind stopped containers. Adding `--rm` tells Docker to delete them after exiting. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 72363183..03cf0658 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ A development version of the AUR package is also [available](https://aur.archlin 1. Run the container ```sh - docker run -it -v \ + docker run --rm -it -v \ /var/run/docker.sock:/var/run/docker.sock \ -v /yourpath:/.config/jesseduffield/lazydocker \ lazyteam/lazydocker @@ -138,7 +138,7 @@ A development version of the AUR package is also [available](https://aur.archlin - You might want to create an alias, for example: ```sh - echo "alias lzd='docker run -it -v /var/run/docker.sock:/var/run/docker.sock -v /yourpath/config:/.config/jesseduffield/lazydocker lazyteam/lazydocker'" >> ~/.zshrc + echo "alias lzd='docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v /yourpath/config:/.config/jesseduffield/lazydocker lazyteam/lazydocker'" >> ~/.zshrc ```