?
本文檔使用 php中文網(wǎng)手冊 發(fā)布
Usage: rm [options] [SERVICE...] Options: -f, --force Don't ask to confirm removal -s, --stop Stop the containers, if required, before removing -v Remove any anonymous volumes attached to containers
刪除已停止的服務容器。
默認情況下,附加到容器的匿名卷不會被刪除。你可以用這個覆蓋它-v
。要列出所有卷,請使用docker volume ls
。
任何不在卷中的數(shù)據(jù)都將丟失。
運行沒有選項的命令也會刪除由docker-compose up
或創(chuàng)建的一次性容器docker-compose run
:
$ docker-compose rm Going to remove djangoquickstart_web_run_1 Are you sure? [yN] y Removing djangoquickstart_web_run_1 ... done