Editing Docker-compose down
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
{{lc}} | {{lc}} | ||
− | <code>[[docker-compose]] down</code> stops and '''removes [[containers]]''', [[networks]] | + | <code>[[docker-compose]] down</code> stops and '''removes [[containers]]''', [[networks]], [[volumes]], and [[images]] created by up |
− | |||
− | + | https://docs.docker.com/compose/reference/down/ | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
docker-compose down | docker-compose down | ||
(no output) | (no output) | ||
Line 21: | Line 14: | ||
* <code>[[docker-compose down]] && [[docker-compose build]] --pull && [[docker-compose up]] -d</code> | * <code>[[docker-compose down]] && [[docker-compose build]] --pull && [[docker-compose up]] -d</code> | ||
− | + | == Help == | |
+ | <pre> | ||
+ | docker-compose down --help | ||
+ | Stops containers and removes containers, networks, volumes, and images | ||
+ | created by `up`. | ||
− | + | By default, the only things removed are: | |
+ | |||
+ | - Containers for services defined in the Compose file | ||
+ | - Networks defined in the `networks` section of the Compose file | ||
+ | - The default network, if one is used | ||
+ | |||
+ | Networks and volumes defined as `external` are never removed. | ||
+ | |||
+ | Usage: down [options] | ||
+ | |||
+ | Options: | ||
+ | --rmi type Remove images. Type must be one of: | ||
+ | 'all': Remove all images used by any service. | ||
+ | 'local': Remove only images that don't have a | ||
+ | custom tag set by the `image` field. | ||
+ | -v, --volumes Remove named volumes declared in the `volumes` | ||
+ | section of the Compose file and anonymous volumes | ||
+ | attached to containers. | ||
+ | --remove-orphans Remove containers for services not defined in the | ||
+ | Compose file | ||
+ | -t, --timeout TIMEOUT Specify a shutdown timeout in seconds. | ||
+ | (default: 10) | ||
+ | </pre> | ||
== Examples == | == Examples == | ||
Line 44: | Line 63: | ||
Supported filenames: [[docker-compose.yml]], docker-compose.yaml | Supported filenames: [[docker-compose.yml]], docker-compose.yaml | ||
− | |||
− | |||
− | |||
== Related commands == | == Related commands == | ||
* {{docker-compose operations}} | * {{docker-compose operations}} | ||
− | |||
− | |||
== See also == | == See also == |
Advertising: