Which of the following tasks are completed by docker-compose down when it is used with additional parameters? (Choose two correct answers.)
Which of the following tasks are completed by docker-compose down when it is used with additional parameters? (Choose two correct answers.)
When using docker-compose down with additional parameters, it can delete all volumes defined in the composer file if the -v or --volumes option is specified. It can also delete all images used in the composer file from the Docker nodes if the --rmi option with 'all' or 'local' type is used. By default, it removes containers and networks defined in the composer file, but these are not dependent on additional parameters.
A and D. 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)
BC would be the option by defaul BUT it can not be because it says "when it is used with additional parameters", so AD
It does not delete the volumes, but it does delete the containers. the correct answer is B and C
A and D seem correct
AD is real correct. "docker-compose down" remove network and container. If you apply arguments, you can remove volumes and/or images.
c is incorrect, networks are removed by default. You don't need to specify additional option to remove it
The correct answer is B and C https://docs.docker.com/compose/reference/down/
No, it´s A and C -v, --volumes Remove named volumes declared in the `volumes` section of the Compose file and anonymous volumes attached to containers.
Which of the following tasks are completed by docker-compose down when it is used with additional parameters?
In reference to https://docs.docker.com/compose/reference/down/ --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. Ans is A & D
B & C is correct From docker-compose help 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
docker-compose down Usage: docker-compose 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) 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