docker_compose_pull.yaml 4.5 KB

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