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}}
+
{{Draft}}
<code>[[docker-compose]] down</code> stops and '''removes [[containers]]''', [[networks]] by default, using <code>--volumes</code> you can also delete [[Docker Volumes|volumes]], and using <code>[[--rmi]]</code> you can delete [[images]] created by <code>[[docker-compose up]]</code>
+
<code>[[docker-compose down]]</code> https://docs.docker.com/compose/reference/down/
* https://docs.docker.com/compose/reference/down/
 
  
By default, the only things removed are:
+
* <code>docker-compose down</code>
* Containers for services defined in the Compose file
+
* <code>docker-compose down -v</code>
* Networks defined in the networks section of the Compose file
+
:: -v, --volumes remove named volumes declared in the `volumes` section of the Compose file and anonymous volumes attached to containers.  
* The default network, if one is used
 
* Networks and volumes defined as external are never removed.
 
  
 
+
* <code>docker-compose down --remove-orphans</code>
== Examples ==
 
docker-compose down
 
(no output)
 
 
 
* <code>docker-compose down [[--volumes]]</code>
 
:: <code>-v, --volumes remove named volumes declared in the `volumes` section of the Compose file and anonymous volumes attached to containers.</code>
 
 
 
* <code>docker-compose down [[--remove-orphans]]</code>
 
 
 
* <code>[[docker-compose down]] && [[docker-compose build]] --pull && [[docker-compose up]] -d</code>
 
 
 
* <code>[[docker-compose down --volumes --rmi all]]</code>
 
 
 
* <code>[[docker-compose down --help]]</code>
 
 
 
== Examples ==
 
* <code>docker-compose -volumes down SERVICE_NAME</code>
 
* <code>docker-compose version 1.23.2, build 1110ad01</code>
 
 
 
docker-compose down
 
Stopping service1  ... done
 
Stopping service2 ... done
 
Removing service1  ... done
 
Removing service2 ... done
 
Removing network your_network
 
 
 
 
 
 
 
docker-compose down
 
ERROR:
 
        Can't find a suitable configuration file in this directory or any
 
        parent. Are you in the right directory?
 
 
        Supported filenames: [[docker-compose.yml]], docker-compose.yaml
 
 
 
== Activities ==
 
* Take down a service: [[docker compose up]] service -d
 
  
 
== Related commands ==
 
== Related commands ==
* {{docker-compose operations}}
+
* <code>[[docker-compose stop]]</code>
* <code>[[docker-compose up]] SERVICE</code>
+
* <code>[[docker-compose up]]</code>
* <code>[[docker-compose rm]]</code>
 
  
 
== See also ==
 
== See also ==

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: