docker_compose_rm.yaml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. ```console
  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: all
  20. shorthand: a
  21. value_type: bool
  22. default_value: "false"
  23. description: Deprecated - no effect
  24. deprecated: false
  25. hidden: true
  26. experimental: false
  27. experimentalcli: false
  28. kubernetes: false
  29. swarm: false
  30. - option: force
  31. shorthand: f
  32. value_type: bool
  33. default_value: "false"
  34. description: Don't ask to confirm removal
  35. deprecated: false
  36. hidden: false
  37. experimental: false
  38. experimentalcli: false
  39. kubernetes: false
  40. swarm: false
  41. - option: stop
  42. shorthand: s
  43. value_type: bool
  44. default_value: "false"
  45. description: Stop the containers, if required, before removing
  46. deprecated: false
  47. hidden: false
  48. experimental: false
  49. experimentalcli: false
  50. kubernetes: false
  51. swarm: false
  52. - option: volumes
  53. shorthand: v
  54. value_type: bool
  55. default_value: "false"
  56. description: Remove any anonymous volumes attached to containers
  57. deprecated: false
  58. hidden: false
  59. experimental: false
  60. experimentalcli: false
  61. kubernetes: false
  62. swarm: false
  63. deprecated: false
  64. experimental: false
  65. experimentalcli: false
  66. kubernetes: false
  67. swarm: false