docker_compose_rm.yaml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. command: docker compose rm
  2. short: Removes stopped service containers
  3. long: |-
  4. Removes stopped service containers.
  5. By default, anonymous volumes attached to containers are not removed. You can override this with `-v`. To list all
  6. volumes, use `docker volume ls`.
  7. Any data which is not in a volume is lost.
  8. Running the command with no options also removes one-off containers created by `docker compose run`:
  9. ```
  10. $ docker compose rm
  11. Going to remove djangoquickstart_web_run_1
  12. Are you sure? [yN] y
  13. Removing djangoquickstart_web_run_1 ... done
  14. ```
  15. usage: docker compose rm [SERVICE...]
  16. pname: docker compose
  17. plink: docker_compose.yaml
  18. options:
  19. - option: force
  20. shorthand: f
  21. value_type: bool
  22. default_value: "false"
  23. description: Don't ask to confirm removal
  24. deprecated: false
  25. experimental: false
  26. experimentalcli: false
  27. kubernetes: false
  28. swarm: false
  29. - option: stop
  30. shorthand: s
  31. value_type: bool
  32. default_value: "false"
  33. description: Stop the containers, if required, before removing
  34. deprecated: false
  35. experimental: false
  36. experimentalcli: false
  37. kubernetes: false
  38. swarm: false
  39. - option: volumes
  40. shorthand: v
  41. value_type: bool
  42. default_value: "false"
  43. description: Remove any anonymous volumes attached to containers
  44. deprecated: false
  45. experimental: false
  46. experimentalcli: false
  47. kubernetes: false
  48. swarm: false
  49. deprecated: false
  50. experimental: false
  51. experimentalcli: false
  52. kubernetes: false
  53. swarm: false