docker_compose_up.yaml 6.1 KB

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