docker_compose_exec.yaml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. command: docker compose exec
  2. short: Execute a command in a running container.
  3. long: "This is the equivalent of `docker exec` targeting a Compose service. \n\nWith this subcommand you can run arbitrary commands in your services. Commands are by default allocating a TTY, so \nyou can use a command such as `docker compose exec web sh` to get an interactive prompt."
  4. usage: docker compose exec [options] [-e KEY=VAL...] [--] SERVICE COMMAND [ARGS...]
  5. pname: docker compose
  6. plink: docker_compose.yaml
  7. options:
  8. - option: detach
  9. shorthand: d
  10. value_type: bool
  11. default_value: "false"
  12. description: 'Detached mode: Run command in the background.'
  13. deprecated: false
  14. experimental: false
  15. experimentalcli: false
  16. kubernetes: false
  17. swarm: false
  18. - option: env
  19. shorthand: e
  20. value_type: stringArray
  21. default_value: '[]'
  22. description: Set environment variables
  23. deprecated: false
  24. experimental: false
  25. experimentalcli: false
  26. kubernetes: false
  27. swarm: false
  28. - option: index
  29. value_type: int
  30. default_value: "1"
  31. description: |
  32. index of the container if there are multiple instances of a service [default: 1].
  33. deprecated: false
  34. experimental: false
  35. experimentalcli: false
  36. kubernetes: false
  37. swarm: false
  38. - option: no-TTY
  39. shorthand: T
  40. value_type: bool
  41. default_value: "false"
  42. description: |
  43. Disable pseudo-TTY allocation. By default `docker compose exec` allocates a TTY.
  44. deprecated: false
  45. experimental: false
  46. experimentalcli: false
  47. kubernetes: false
  48. swarm: false
  49. - option: privileged
  50. value_type: bool
  51. default_value: "false"
  52. description: Give extended privileges to the process.
  53. deprecated: false
  54. experimental: false
  55. experimentalcli: false
  56. kubernetes: false
  57. swarm: false
  58. - option: user
  59. shorthand: u
  60. value_type: string
  61. description: Run the command as this user.
  62. deprecated: false
  63. experimental: false
  64. experimentalcli: false
  65. kubernetes: false
  66. swarm: false
  67. - option: workdir
  68. shorthand: w
  69. value_type: string
  70. description: Path to workdir directory for this command.
  71. deprecated: false
  72. experimental: false
  73. experimentalcli: false
  74. kubernetes: false
  75. swarm: false
  76. deprecated: false
  77. experimental: false
  78. experimentalcli: false
  79. kubernetes: false
  80. swarm: false