docker_compose_pull.yaml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. command: docker compose pull
  2. short: Pull service images
  3. long: |
  4. Pulls an image associated with a service defined in a `compose.yaml` file, but does not start containers based on those images
  5. usage: docker compose pull [OPTIONS] [SERVICE...]
  6. pname: docker compose
  7. plink: docker_compose.yaml
  8. options:
  9. - option: ignore-buildable
  10. value_type: bool
  11. default_value: "false"
  12. description: Ignore images that can be built
  13. deprecated: false
  14. hidden: false
  15. experimental: false
  16. experimentalcli: false
  17. kubernetes: false
  18. swarm: false
  19. - option: ignore-pull-failures
  20. value_type: bool
  21. default_value: "false"
  22. description: Pull what it can and ignores images with pull failures
  23. deprecated: false
  24. hidden: false
  25. experimental: false
  26. experimentalcli: false
  27. kubernetes: false
  28. swarm: false
  29. - option: include-deps
  30. value_type: bool
  31. default_value: "false"
  32. description: Also pull services declared as dependencies
  33. deprecated: false
  34. hidden: false
  35. experimental: false
  36. experimentalcli: false
  37. kubernetes: false
  38. swarm: false
  39. - option: no-parallel
  40. value_type: bool
  41. default_value: "true"
  42. description: DEPRECATED disable parallel pulling
  43. deprecated: false
  44. hidden: true
  45. experimental: false
  46. experimentalcli: false
  47. kubernetes: false
  48. swarm: false
  49. - option: parallel
  50. value_type: bool
  51. default_value: "true"
  52. description: DEPRECATED pull multiple images in parallel
  53. deprecated: false
  54. hidden: true
  55. experimental: false
  56. experimentalcli: false
  57. kubernetes: false
  58. swarm: false
  59. - option: policy
  60. value_type: string
  61. description: Apply pull policy ("missing"|"always")
  62. deprecated: false
  63. hidden: false
  64. experimental: false
  65. experimentalcli: false
  66. kubernetes: false
  67. swarm: false
  68. - option: quiet
  69. shorthand: q
  70. value_type: bool
  71. default_value: "false"
  72. description: Pull without printing progress information
  73. deprecated: false
  74. hidden: false
  75. experimental: false
  76. experimentalcli: false
  77. kubernetes: false
  78. swarm: false
  79. inherited_options:
  80. - option: dry-run
  81. value_type: bool
  82. default_value: "false"
  83. description: Execute command in dry run mode
  84. deprecated: false
  85. hidden: false
  86. experimental: false
  87. experimentalcli: false
  88. kubernetes: false
  89. swarm: false
  90. examples: |-
  91. Consider the following `compose.yaml`:
  92. ```yaml
  93. services:
  94. db:
  95. image: postgres
  96. web:
  97. build: .
  98. command: bundle exec rails s -p 3000 -b '0.0.0.0'
  99. volumes:
  100. - .:/myapp
  101. ports:
  102. - "3000:3000"
  103. depends_on:
  104. - db
  105. ```
  106. If you run `docker compose pull ServiceName` in the same directory as the `compose.yaml` file that defines the service,
  107. Docker pulls the associated image. For example, to call the postgres image configured as the db service in our example,
  108. you would run `docker compose pull db`.
  109. ```console
  110. $ docker compose pull db
  111. [+] Running 1/15
  112. ⠸ db Pulling 12.4s
  113. ⠿ 45b42c59be33 Already exists 0.0s
  114. ⠹ 40adec129f1a Downloading 3.374MB/4.178MB 9.3s
  115. ⠹ b4c431d00c78 Download complete 9.3s
  116. ⠹ 2696974e2815 Download complete 9.3s
  117. ⠹ 564b77596399 Downloading 5.622MB/7.965MB 9.3s
  118. ⠹ 5044045cf6f2 Downloading 216.7kB/391.1kB 9.3s
  119. ⠹ d736e67e6ac3 Waiting 9.3s
  120. ⠹ 390c1c9a5ae4 Waiting 9.3s
  121. ⠹ c0e62f172284 Waiting 9.3s
  122. ⠹ ebcdc659c5bf Waiting 9.3s
  123. ⠹ 29be22cb3acc Waiting 9.3s
  124. ⠹ f63c47038e66 Waiting 9.3s
  125. ⠹ 77a0c198cde5 Waiting 9.3s
  126. ⠹ c8752d5b785c Waiting 9.3s
  127. ```
  128. `docker compose pull` tries to pull image for services with a build section. If pull fails, it lets you know this service image must be built. You can skip this by setting `--ignore-buildable` flag.
  129. deprecated: false
  130. hidden: false
  131. experimental: false
  132. experimentalcli: false
  133. kubernetes: false
  134. swarm: false