浏览代码

Clarify behaviour of 'rm'

Signed-off-by: Aanand Prasad <[email protected]>
Aanand Prasad 10 年之前
父节点
当前提交
2e9a49b4eb
共有 2 个文件被更改,包括 10 次插入0 次删除
  1. 5 0
      compose/cli/main.py
  2. 5 0
      docs/reference/rm.md

+ 5 - 0
compose/cli/main.py

@@ -343,6 +343,11 @@ class TopLevelCommand(DocoptCommand):
         """
         Remove stopped service containers.
 
+        By default, volumes attached to containers will not be removed. You can see all
+        volumes with `docker volume ls`.
+
+        Any data which is not in a volume will be lost.
+
         Usage: rm [options] [SERVICE...]
 
         Options:

+ 5 - 0
docs/reference/rm.md

@@ -20,3 +20,8 @@ Options:
 ```
 
 Removes stopped service containers.
+
+By default, volumes attached to containers will not be removed. You can see all
+volumes with `docker volume ls`.
+
+Any data which is not in a volume will be lost.