docker_compose_up.yaml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. command: docker compose up
  2. short: Create and start containers
  3. long: "Builds, (re)creates, starts, and attaches to containers for a service.\n\nUnless
  4. they are already running, this command also starts any linked services.\n\nThe
  5. `docker compose up` command aggregates the output of each container (liked `docker
  6. compose logs --follow` does). \nWhen the command exits, all containers are stopped.
  7. Running `docker compose up --detach` starts the containers in the \nbackground
  8. and leaves them running.\n\nIf there are existing containers for a service, and
  9. the service’s configuration or image was changed after the \ncontainer’s creation,
  10. `docker compose up` picks up the changes by stopping and recreating the containers
  11. \n(preserving mounted volumes). To prevent Compose from picking up changes, use
  12. the `--no-recreate` flag.\n\nIf you want to force Compose to stop and recreate
  13. all containers, use the `--force-recreate` flag.\n\nIf the process encounters
  14. an error, the exit code for this command is `1`.\nIf the process is interrupted
  15. using `SIGINT` (ctrl + C) or `SIGTERM`, the containers are stopped, and the exit
  16. code is `0`."
  17. usage: docker compose up [SERVICE...]
  18. pname: docker compose
  19. plink: docker_compose.yaml
  20. options:
  21. - option: abort-on-container-exit
  22. value_type: bool
  23. default_value: "false"
  24. description: |
  25. Stops all containers if any container was stopped. Incompatible with -d
  26. deprecated: false
  27. experimental: false
  28. experimentalcli: false
  29. kubernetes: false
  30. swarm: false
  31. - option: always-recreate-deps
  32. value_type: bool
  33. default_value: "false"
  34. description: |
  35. Recreate dependent containers. Incompatible with --no-recreate.
  36. deprecated: false
  37. experimental: false
  38. experimentalcli: false
  39. kubernetes: false
  40. swarm: false
  41. - option: attach-dependencies
  42. value_type: bool
  43. default_value: "false"
  44. description: Attach to dependent containers.
  45. deprecated: false
  46. experimental: false
  47. experimentalcli: false
  48. kubernetes: false
  49. swarm: false
  50. - option: build
  51. value_type: bool
  52. default_value: "false"
  53. description: Build images before starting containers.
  54. deprecated: false
  55. experimental: false
  56. experimentalcli: false
  57. kubernetes: false
  58. swarm: false
  59. - option: detach
  60. shorthand: d
  61. value_type: bool
  62. default_value: "false"
  63. description: 'Detached mode: Run containers in the background'
  64. deprecated: false
  65. experimental: false
  66. experimentalcli: false
  67. kubernetes: false
  68. swarm: false
  69. - option: environment
  70. shorthand: e
  71. value_type: stringArray
  72. default_value: '[]'
  73. description: Environment variables
  74. deprecated: false
  75. experimental: false
  76. experimentalcli: false
  77. kubernetes: false
  78. swarm: false
  79. - option: exit-code-from
  80. value_type: string
  81. description: |
  82. Return the exit code of the selected service container. Implies --abort-on-container-exit
  83. deprecated: false
  84. experimental: false
  85. experimentalcli: false
  86. kubernetes: false
  87. swarm: false
  88. - option: force-recreate
  89. value_type: bool
  90. default_value: "false"
  91. description: |
  92. Recreate containers even if their configuration and image haven't changed.
  93. deprecated: false
  94. experimental: false
  95. experimentalcli: false
  96. kubernetes: false
  97. swarm: false
  98. - option: no-build
  99. value_type: bool
  100. default_value: "false"
  101. description: Don't build an image, even if it's missing.
  102. deprecated: false
  103. experimental: false
  104. experimentalcli: false
  105. kubernetes: false
  106. swarm: false
  107. - option: no-color
  108. value_type: bool
  109. default_value: "false"
  110. description: Produce monochrome output.
  111. deprecated: false
  112. experimental: false
  113. experimentalcli: false
  114. kubernetes: false
  115. swarm: false
  116. - option: no-deps
  117. value_type: bool
  118. default_value: "false"
  119. description: Don't start linked services.
  120. deprecated: false
  121. experimental: false
  122. experimentalcli: false
  123. kubernetes: false
  124. swarm: false
  125. - option: no-log-prefix
  126. value_type: bool
  127. default_value: "false"
  128. description: Don't print prefix in logs.
  129. deprecated: false
  130. experimental: false
  131. experimentalcli: false
  132. kubernetes: false
  133. swarm: false
  134. - option: no-recreate
  135. value_type: bool
  136. default_value: "false"
  137. description: |
  138. If containers already exist, don't recreate them. Incompatible with --force-recreate.
  139. deprecated: false
  140. experimental: false
  141. experimentalcli: false
  142. kubernetes: false
  143. swarm: false
  144. - option: no-start
  145. value_type: bool
  146. default_value: "false"
  147. description: Don't start the services after creating them.
  148. deprecated: false
  149. experimental: false
  150. experimentalcli: false
  151. kubernetes: false
  152. swarm: false
  153. - option: quiet-pull
  154. value_type: bool
  155. default_value: "false"
  156. description: Pull without printing progress information.
  157. deprecated: false
  158. experimental: false
  159. experimentalcli: false
  160. kubernetes: false
  161. swarm: false
  162. - option: remove-orphans
  163. value_type: bool
  164. default_value: "false"
  165. description: |
  166. Remove containers for services not defined in the Compose file.
  167. deprecated: false
  168. experimental: false
  169. experimentalcli: false
  170. kubernetes: false
  171. swarm: false
  172. - option: renew-anon-volumes
  173. shorthand: V
  174. value_type: bool
  175. default_value: "false"
  176. description: |
  177. Recreate anonymous volumes instead of retrieving data from the previous containers.
  178. deprecated: false
  179. experimental: false
  180. experimentalcli: false
  181. kubernetes: false
  182. swarm: false
  183. - option: scale
  184. value_type: stringArray
  185. default_value: '[]'
  186. description: |
  187. Scale SERVICE to NUM instances. Overrides the `scale` setting in the Compose file if present.
  188. deprecated: false
  189. experimental: false
  190. experimentalcli: false
  191. kubernetes: false
  192. swarm: false
  193. - option: timeout
  194. shorthand: t
  195. value_type: int
  196. default_value: "10"
  197. description: |
  198. Use this timeout in seconds for container shutdown when attached or when containers are already running.
  199. deprecated: false
  200. experimental: false
  201. experimentalcli: false
  202. kubernetes: false
  203. swarm: false
  204. deprecated: false
  205. experimental: false
  206. experimentalcli: false
  207. kubernetes: false
  208. swarm: false