From 256c55e585d99c5ef1e55b8c332f4f0a90cdc37e Mon Sep 17 00:00:00 2001 From: Liam Pietralla Date: Wed, 4 Feb 2026 12:35:07 +1100 Subject: [PATCH] docker cli --- .vitepress/config.mts | 1 + docs/docker/cli-commands.md | 17 +++++++++++++++++ docs/docker/index.md | 3 ++- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 docs/docker/cli-commands.md diff --git a/.vitepress/config.mts b/.vitepress/config.mts index b57aa6c..e236763 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -71,6 +71,7 @@ export default defineConfig({ link: '/docker/', collapsed: true, items: [ + { text: 'CLI Commands', link: '/docker/cli-commands' }, { text: 'Docker Exec', link: '/docker/exec-into-container' }, { text: 'Local DB (MSSQL)', link: '/docker/local-db-mssql' }, { text: 'Local DB (PostgreSQL)', link: '/docker/local-db-pg' }, diff --git a/docs/docker/cli-commands.md b/docs/docker/cli-commands.md new file mode 100644 index 0000000..f2c1c60 --- /dev/null +++ b/docs/docker/cli-commands.md @@ -0,0 +1,17 @@ +# CLI Commands + +The docker CLI can be used for a variety of management tasks. + +## Clear Multiple Volumes + +We can combine the `docker volume rm` command with `docker volume ls` to clear multiple volumes at once. For example, to remove all unused volumes: + +```bash +docker volume rm $(docker volume ls -qf dangling=true) +``` + +or to remove volumes with a specific name pattern: + +```bash +docker volume rm $(docker volume ls -qf name=your_pattern) +``` \ No newline at end of file diff --git a/docs/docker/index.md b/docs/docker/index.md index fc05300..2d0798a 100644 --- a/docs/docker/index.md +++ b/docs/docker/index.md @@ -2,4 +2,5 @@ #### [Exec Into Container](./exec-into-container.md) #### [Local Database With Scripts (MSSQL)](./local-db-mssql.md) -#### [Local Database With Scripts (PostgreSQL)](./local-db-pg.md) \ No newline at end of file +#### [Local Database With Scripts (PostgreSQL)](./local-db-pg.md) +#### [CLI Commands](./cli-commands.md) \ No newline at end of file