docker_compose_up.yaml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. command: docker compose up
  2. short: Create and start containers
  3. long: |-
  4. Builds, (re)creates, starts, and attaches to containers for a service.
  5. Unless they are already running, this command also starts any linked services.
  6. The `docker compose up` command aggregates the output of each container (like `docker compose logs --follow` does).
  7. One can optionally select a subset of services to attach to using `--attach` flag, or exclude some services using
  8. `--no-attach` to prevent output to be flooded by some verbose services.
  9. When the command exits, all containers are stopped. Running `docker compose up --detach` starts the containers in the
  10. background and leaves them running.
  11. If there are existing containers for a service, and the service’s configuration or image was changed after the
  12. container’s creation, `docker compose up` picks up the changes by stopping and recreating the containers
  13. (preserving mounted volumes). To prevent Compose from picking up changes, use the `--no-recreate` flag.
  14. If you want to force Compose to stop and recreate all containers, use the `--force-recreate` flag.
  15. If the process encounters an error, the exit code for this command is `1`.
  16. If the process is interrupted using `SIGINT` (ctrl + C) or `SIGTERM`, the containers are stopped, and the exit code is `0`.
  17. usage: docker compose up [OPTIONS] [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. hidden: false
  28. experimental: false
  29. experimentalcli: false
  30. kubernetes: false
  31. swarm: false
  32. - option: always-recreate-deps
  33. value_type: bool
  34. default_value: "false"
  35. description: Recreate dependent containers. Incompatible with --no-recreate.
  36. deprecated: false
  37. hidden: false
  38. experimental: false
  39. experimentalcli: false
  40. kubernetes: false
  41. swarm: false
  42. - option: attach
  43. value_type: stringArray
  44. default_value: '[]'
  45. description: Attach to service output.
  46. deprecated: false
  47. hidden: false
  48. experimental: false
  49. experimentalcli: false
  50. kubernetes: false
  51. swarm: false
  52. - option: attach-dependencies
  53. value_type: bool
  54. default_value: "false"
  55. description: Attach to dependent containers.
  56. deprecated: false
  57. hidden: false
  58. experimental: false
  59. experimentalcli: false
  60. kubernetes: false
  61. swarm: false
  62. - option: build
  63. value_type: bool
  64. default_value: "false"
  65. description: Build images before starting containers.
  66. deprecated: false
  67. hidden: false
  68. experimental: false
  69. experimentalcli: false
  70. kubernetes: false
  71. swarm: false
  72. - option: detach
  73. shorthand: d
  74. value_type: bool
  75. default_value: "false"
  76. description: 'Detached mode: Run containers in the background'
  77. deprecated: false
  78. hidden: false
  79. experimental: false
  80. experimentalcli: false
  81. kubernetes: false
  82. swarm: false
  83. - option: exit-code-from
  84. value_type: string
  85. description: |
  86. Return the exit code of the selected service container. Implies --abort-on-container-exit
  87. deprecated: false
  88. hidden: false
  89. experimental: false
  90. experimentalcli: false
  91. kubernetes: false
  92. swarm: false
  93. - option: force-recreate
  94. value_type: bool
  95. default_value: "false"
  96. description: |
  97. Recreate containers even if their configuration and image haven't changed.
  98. deprecated: false
  99. hidden: false
  100. experimental: false
  101. experimentalcli: false
  102. kubernetes: false
  103. swarm: false
  104. - option: no-attach
  105. value_type: stringArray
  106. default_value: '[]'
  107. description: Don't attach to specified service.
  108. deprecated: false
  109. hidden: false
  110. experimental: false
  111. experimentalcli: false
  112. kubernetes: false
  113. swarm: false
  114. - option: no-build
  115. value_type: bool
  116. default_value: "false"
  117. description: Don't build an image, even if it's missing.
  118. deprecated: false
  119. hidden: false
  120. experimental: false
  121. experimentalcli: false
  122. kubernetes: false
  123. swarm: false
  124. - option: no-color
  125. value_type: bool
  126. default_value: "false"
  127. description: Produce monochrome output.
  128. deprecated: false
  129. hidden: false
  130. experimental: false
  131. experimentalcli: false
  132. kubernetes: false
  133. swarm: false
  134. - option: no-deps
  135. value_type: bool
  136. default_value: "false"
  137. description: Don't start linked services.
  138. deprecated: false
  139. hidden: false
  140. experimental: false
  141. experimentalcli: false
  142. kubernetes: false
  143. swarm: false
  144. - option: no-log-prefix
  145. value_type: bool
  146. default_value: "false"
  147. description: Don't print prefix in logs.
  148. deprecated: false
  149. hidden: false
  150. experimental: false
  151. experimentalcli: false
  152. kubernetes: false
  153. swarm: false
  154. - option: no-recreate
  155. value_type: bool
  156. default_value: "false"
  157. description: |
  158. If containers already exist, don't recreate them. Incompatible with --force-recreate.
  159. deprecated: false
  160. hidden: false
  161. experimental: false
  162. experimentalcli: false
  163. kubernetes: false
  164. swarm: false
  165. - option: no-start
  166. value_type: bool
  167. default_value: "false"
  168. description: Don't start the services after creating them.
  169. deprecated: false
  170. hidden: false
  171. experimental: false
  172. experimentalcli: false
  173. kubernetes: false
  174. swarm: false
  175. - option: pull
  176. value_type: string
  177. default_value: missing
  178. description: Pull image before running ("always"|"missing"|"never")
  179. deprecated: false
  180. hidden: false
  181. experimental: false
  182. experimentalcli: false
  183. kubernetes: false
  184. swarm: false
  185. - option: quiet-pull
  186. value_type: bool
  187. default_value: "false"
  188. description: Pull without printing progress information.
  189. deprecated: false
  190. hidden: false
  191. experimental: false
  192. experimentalcli: false
  193. kubernetes: false
  194. swarm: false
  195. - option: remove-orphans
  196. value_type: bool
  197. default_value: "false"
  198. description: Remove containers for services not defined in the Compose file.
  199. deprecated: false
  200. hidden: false
  201. experimental: false
  202. experimentalcli: false
  203. kubernetes: false
  204. swarm: false
  205. - option: renew-anon-volumes
  206. shorthand: V
  207. value_type: bool
  208. default_value: "false"
  209. description: |
  210. Recreate anonymous volumes instead of retrieving data from the previous containers.
  211. deprecated: false
  212. hidden: false
  213. experimental: false
  214. experimentalcli: false
  215. kubernetes: false
  216. swarm: false
  217. - option: scale
  218. value_type: stringArray
  219. default_value: '[]'
  220. description: |
  221. Scale SERVICE to NUM instances. Overrides the `scale` setting in the Compose file if present.
  222. deprecated: false
  223. hidden: false
  224. experimental: false
  225. experimentalcli: false
  226. kubernetes: false
  227. swarm: false
  228. - option: timeout
  229. shorthand: t
  230. value_type: int
  231. default_value: "10"
  232. description: |
  233. Use this timeout in seconds for container shutdown when attached or when containers are already running.
  234. deprecated: false
  235. hidden: false
  236. experimental: false
  237. experimentalcli: false
  238. kubernetes: false
  239. swarm: false
  240. - option: timestamps
  241. value_type: bool
  242. default_value: "false"
  243. description: Show timestamps.
  244. deprecated: false
  245. hidden: false
  246. experimental: false
  247. experimentalcli: false
  248. kubernetes: false
  249. swarm: false
  250. - option: wait
  251. value_type: bool
  252. default_value: "false"
  253. description: Wait for services to be running|healthy. Implies detached mode.
  254. deprecated: false
  255. hidden: false
  256. experimental: false
  257. experimentalcli: false
  258. kubernetes: false
  259. swarm: false
  260. deprecated: false
  261. experimental: false
  262. experimentalcli: false
  263. kubernetes: false
  264. swarm: false