- 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.
- 騰訊iOS測試實踐
- Julia機器學習核心編程:人人可用的高性能科學計算
- Java程序設計與實踐教程(第2版)
- C語言從入門到精通(第4版)
- Mastering Unity Shaders and Effects
- 零基礎學Kotlin之Android項目開發實戰
- 零基礎學C語言程序設計
- 自學Python:編程基礎、科學計算及數據分析(第2版)
- 零代碼實戰:企業級應用搭建與案例詳解
- Learning Kotlin by building Android Applications
- LabVIEW數據采集
- 分布式數據庫HBase案例教程
- Beginning PHP
- Distributed Computing with Python
- Python Django Web從入門到項目實戰(視頻版)