docker_compose_exec.yaml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. command: docker compose exec
  2. short: Execute a command in a running container
  3. long: |-
  4. This is the equivalent of `docker exec` targeting a Compose service.
  5. With this subcommand, you can run arbitrary commands in your services. Commands allocate a TTY by default, so
  6. you can use a command such as `docker compose exec web sh` to get an interactive prompt.
  7. usage: docker compose exec [OPTIONS] SERVICE COMMAND [ARGS...]
  8. pname: docker compose
  9. plink: docker_compose.yaml
  10. options:
  11. - option: detach
  12. shorthand: d
  13. value_type: bool
  14. default_value: "false"
  15. description: 'Detached mode: Run command in the background'
  16. deprecated: false
  17. hidden: false
  18. experimental: false
  19. experimentalcli: false
  20. kubernetes: false
  21. swarm: false
  22. - option: env
  23. shorthand: e
  24. value_type: stringArray
  25. default_value: '[]'
  26. description: Set environment variables
  27. deprecated: false
  28. hidden: false
  29. experimental: false
  30. experimentalcli: false
  31. kubernetes: false
  32. swarm: false
  33. - option: index
  34. value_type: int
  35. default_value: "0"
  36. description: Index of the container if service has multiple replicas
  37. deprecated: false
  38. hidden: false
  39. experimental: false
  40. experimentalcli: false
  41. kubernetes: false
  42. swarm: false
  43. - option: interactive
  44. shorthand: i
  45. value_type: bool
  46. default_value: "true"
  47. description: Keep STDIN open even if not attached
  48. deprecated: false
  49. hidden: true
  50. experimental: false
  51. experimentalcli: false
  52. kubernetes: false
  53. swarm: false
  54. - option: no-TTY
  55. shorthand: T
  56. value_type: bool
  57. default_value: "true"
  58. description: |
  59. Disable pseudo-TTY allocation. By default `docker compose exec` allocates a TTY.
  60. deprecated: false
  61. hidden: false
  62. experimental: false
  63. experimentalcli: false
  64. kubernetes: false
  65. swarm: false
  66. - option: privileged
  67. value_type: bool
  68. default_value: "false"
  69. description: Give extended privileges to the process
  70. deprecated: false
  71. hidden: false
  72. experimental: false
  73. experimentalcli: false
  74. kubernetes: false
  75. swarm: false
  76. - option: tty
  77. shorthand: t
  78. value_type: bool
  79. default_value: "true"
  80. description: Allocate a pseudo-TTY
  81. deprecated: false
  82. hidden: true
  83. experimental: false
  84. experimentalcli: false
  85. kubernetes: false
  86. swarm: false
  87. - option: user
  88. shorthand: u
  89. value_type: string
  90. description: Run the command as this user
  91. deprecated: false
  92. hidden: false
  93. experimental: false
  94. experimentalcli: false
  95. kubernetes: false
  96. swarm: false
  97. - option: workdir
  98. shorthand: w
  99. value_type: string
  100. description: Path to workdir directory for this command
  101. deprecated: false
  102. hidden: false
  103. experimental: false
  104. experimentalcli: false
  105. kubernetes: false
  106. swarm: false
  107. inherited_options:
  108. - option: dry-run
  109. value_type: bool
  110. default_value: "false"
  111. description: Execute command in dry run mode
  112. deprecated: false
  113. hidden: false
  114. experimental: false
  115. experimentalcli: false
  116. kubernetes: false
  117. swarm: false
  118. deprecated: false
  119. hidden: false
  120. experimental: false
  121. experimentalcli: false
  122. kubernetes: false
  123. swarm: false