- Hands-On Kubernetes on Windows
- Piotr Tylenda
- 156字
- 2021-06-24 16:54:01
Removing volumes
To remove existing named or anonymous volumes using the docker volume rm command, they cannot be used in any container (even stopped ones). The standard procedure would be as follows:
docker stop <containerId>
docker rm <containerId>
docker volume rm <volumeId>
For anonymous volumes, if you use the --rm flag for the docker run command, the container will be removed on exit, along with its anonymous volumes. This flag should be used depending on the scenario – in most cases, it is useful for testing and development purposes to make cleanup easier.
During development, you may occasionally need to perform a full cleanup of all of the volumes on your Docker host, for example, if you need to free disk space. The Docker CLI provides a dedicated command that will remove any volumes that are not used in any container:
docker volume prune
Next, we will take a look at bind mounts and how they differ from volumes.
- Instant Apache Stanbol
- MongoDB for Java Developers
- Python數(shù)據(jù)分析(第2版)
- Python Data Analysis(Second Edition)
- PhpStorm Cookbook
- 運(yùn)用后端技術(shù)處理業(yè)務(wù)邏輯(藍(lán)橋杯軟件大賽培訓(xùn)教材-Java方向)
- C++反匯編與逆向分析技術(shù)揭秘(第2版)
- Machine Learning for Developers
- C++程序設(shè)計教程
- Visual Basic 程序設(shè)計實踐教程
- HTML5移動前端開發(fā)基礎(chǔ)與實戰(zhàn)(微課版)
- Selenium WebDriver Practical Guide
- 3D Printing Designs:Octopus Pencil Holder
- C語言程序設(shè)計教程
- 數(shù)據(jù)結(jié)構(gòu):C語言描述(融媒體版)