?
This document uses PHP Chinese website manual Release
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
刪除已停止的服務(wù)容器。
默認(rèn)情況下,附加到容器的匿名卷不會(huì)被刪除。你可以用這個(gè)覆蓋它-v
。要列出所有卷,請(qǐng)使用docker volume ls
。
任何不在卷中的數(shù)據(jù)都將丟失。
運(yùn)行沒(méi)有選項(xiàng)的命令也會(huì)刪除由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