2025-02-18 21:16:27 +01:00
# Docker Role 🚀
2020-12-31 10:37:31 +01:00
2025-02-18 21:16:27 +01:00
This role is part of the [CyMaIS Project ](https://github.com/kevinveenbirkenbach/cymais ), maintained and developed by [Kevin Veen-Birkenbach ](https://www.veen.world/ ).
2022-12-03 18:08:26 +01:00
2025-02-18 21:16:27 +01:00
---
## Maintenance 🛠️
### List Unused Volumes
```bash
docker volume ls -q -f "dangling=true"
2022-12-03 18:08:26 +01:00
```
2025-02-18 21:16:27 +01:00
### Remove All Unused Volumes
```bash
docker volume rm $(docker volume ls -q -f "dangling=true")
2022-12-03 18:08:26 +01:00
```
2025-02-18 21:16:27 +01:00
### Network Issues Fixes
```bash
2025-02-11 04:49:21 +01:00
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker network prune -f
2025-02-21 03:53:27 +01:00
systemctl stop docker
rm -fv /var/lib/docker/network/files/local-kv.db
systemctl start docker
2025-02-11 04:49:21 +01:00
```
2025-02-18 21:16:27 +01:00
---
## Warning ⚠️
**Caution:** The following instructions will delete **all Docker containers and volumes** on your server.
Make sure you have backups or that you're certain you want to clean your Docker environment completely.
---
## Cleaning Up Docker Containers and Volumes 🧹
### Delete All Docker Containers
```bash
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
```
### Delete All Docker Volumes
```bash
docker volume rm $(docker volume ls -q)
```
2025-02-11 04:49:21 +01:00
2025-02-18 21:16:27 +01:00
---
2021-01-02 10:02:17 +01:00
2025-02-18 21:16:27 +01:00
Enjoy using this role and happy containerizing! 🎉