Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 914 Bytes

File metadata and controls

32 lines (25 loc) · 914 Bytes
description keywords title notoc
Removes stopped service containers.
fig, composition, compose, docker, orchestration, cli, rm
docker-compose rm
true
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

Removes stopped service containers.

By default, anonymous volumes attached to containers will not be removed. You can override this with -v. To list all volumes, use docker volume ls.

Any data which is not in a volume will be lost.

Running the command with no options will also remove one-off containers created by docker-compose up or docker-compose run:

$ docker-compose rm
Going to remove djangoquickstart_web_run_1
Are you sure? [yN] y
Removing djangoquickstart_web_run_1 ... done