| 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 |
|
| 93 |
```yaml |
| 94 |
services: |
| 95 |
db: |
| 96 |
image: postgres |
| 97 |
web: |
| 98 |
build: . |
| 99 |
command: bundle exec rails s -p 3000 -b '0.0.0.0' |
| 100 |
volumes: |
| 101 |
- .:/myapp |
| 102 |
ports: |
| 103 |
- "3000:3000" |
| 104 |
depends_on: |
| 105 |
- db |
| 106 |
``` |
| 107 |
|
| 108 |
If you run `docker compose pull ServiceName` in the same directory as the `compose.yaml` file that defines the service, |
| 109 |
Docker pulls the associated image. For example, to call the postgres image configured as the db service in our example, |
| 110 |
you would run `docker compose pull db`. |
| 111 |
|
| 112 |
```console |
| 113 |
$ docker compose pull db |
| 114 |
[+] Running 1/15 |
| 115 |
⠸ db Pulling 12.4s |
| 116 |
⠿ 45b42c59be33 Already exists 0.0s |
| 117 |
⠹ 40adec129f1a Downloading 3.374MB/4.178MB 9.3s |
| 118 |
⠹ b4c431d00c78 Download complete 9.3s |
| 119 |
⠹ 2696974e2815 Download complete 9.3s |
| 120 |
⠹ 564b77596399 Downloading 5.622MB/7.965MB 9.3s |
| 121 |
⠹ 5044045cf6f2 Downloading 216.7kB/391.1kB 9.3s |
| 122 |
⠹ d736e67e6ac3 Waiting 9.3s |
| 123 |
⠹ 390c1c9a5ae4 Waiting 9.3s |
| 124 |
⠹ c0e62f172284 Waiting 9.3s |
| 125 |
⠹ ebcdc659c5bf Waiting 9.3s |
| 126 |
⠹ 29be22cb3acc Waiting 9.3s |
| 127 |
⠹ f63c47038e66 Waiting 9.3s |
| 128 |
⠹ 77a0c198cde5 Waiting 9.3s |
| 129 |
⠹ c8752d5b785c Waiting 9.3s |
| 130 |
``` |
| 131 |
|
| 132 |
`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. |
| 133 |
deprecated: false |
| 134 |
hidden: false |
| 135 |
experimental: false |
| 136 |
experimentalcli: false |
| 137 |
kubernetes: false |
| 138 |
swarm: false |
| 139 |
|