2021-03-08 15:47:24 +01:00
command : docker compose pull
short : Pull service images
2024-02-14 20:02:37 +01:00
long : |
Pulls an image associated with a service defined in a `compose.yaml` file, but does not start containers based on those images
2022-08-02 13:11:57 +02:00
usage : docker compose pull [OPTIONS] [SERVICE...]
2021-03-08 15:47:24 +01:00
pname : docker compose
plink : docker_compose.yaml
options :
2023-01-03 10:54:03 +01:00
- option : ignore-buildable
value_type : bool
default_value : "false"
2024-02-14 20:02:37 +01:00
description : Ignore images that can be built
2023-01-03 10:54:03 +01:00
deprecated : false
hidden : false
experimental : false
experimentalcli : false
kubernetes : false
swarm : false
2022-07-26 14:58:08 +02:00
- option : ignore-pull-failures
value_type : bool
default_value : "false"
2024-02-14 20:02:37 +01:00
description : Pull what it can and ignores images with pull failures
2022-07-26 14:58:08 +02:00
deprecated : false
hidden : false
experimental : false
experimentalcli : false
kubernetes : false
swarm : false
- option : include-deps
value_type : bool
default_value : "false"
2024-02-14 20:02:37 +01:00
description : Also pull services declared as dependencies
2022-07-26 14:58:08 +02:00
deprecated : false
hidden : false
experimental : false
experimentalcli : false
kubernetes : false
swarm : false
- option : no -parallel
value_type : bool
default_value : "true"
2024-02-14 20:02:37 +01:00
description : DEPRECATED disable parallel pulling
2022-07-26 14:58:08 +02:00
deprecated : false
hidden : true
experimental : false
experimentalcli : false
kubernetes : false
swarm : false
- option : parallel
value_type : bool
default_value : "true"
2024-02-14 20:02:37 +01:00
description : DEPRECATED pull multiple images in parallel
2022-07-26 14:58:08 +02:00
deprecated : false
hidden : true
experimental : false
experimentalcli : false
kubernetes : false
swarm : false
2023-09-07 16:36:22 +02:00
- option : policy
value_type : string
2024-02-14 20:02:37 +01:00
description : Apply pull policy ("missing"|"always")
2023-09-07 16:36:22 +02:00
deprecated : false
hidden : false
experimental : false
experimentalcli : false
kubernetes : false
swarm : false
2022-07-26 14:58:08 +02:00
- option : quiet
shorthand : q
value_type : bool
default_value : "false"
2024-02-14 20:02:37 +01:00
description : Pull without printing progress information
2022-07-26 14:58:08 +02:00
deprecated : false
hidden : false
experimental : false
experimentalcli : false
kubernetes : false
swarm : false
2023-05-05 12:43:27 +02:00
inherited_options :
- option : dry-run
value_type : bool
default_value : "false"
description : Execute command in dry run mode
deprecated : false
hidden : false
experimental : false
experimentalcli : false
kubernetes : false
swarm : false
2022-03-09 13:24:09 +01:00
examples : |-
2023-10-31 11:50:42 +01:00
Consider the following `compose.yaml` :
2022-03-09 13:24:09 +01:00
2022-07-26 14:58:08 +02:00
```yaml
services :
db :
image : postgres
web :
build : .
command : bundle exec rails s -p 3000 -b '0.0.0.0'
volumes :
- .:/myapp
ports :
- "3000:3000"
depends_on :
- db
```
2022-03-09 13:24:09 +01:00
2022-07-26 14:58:08 +02:00
If you run `docker compose pull ServiceName` in the same directory as the `compose.yaml` file that defines the service,
Docker pulls the associated image. For example, to call the postgres image configured as the db service in our example,
you would run `docker compose pull db`.
2022-03-09 13:24:09 +01:00
2022-07-26 14:58:08 +02:00
```console
$ docker compose pull db
[ +] Running 1/15
⠸ db Pulling 12.4s
⠿ 45b42c59be33 Already exists 0.0s
⠹ 40adec129f1a Downloading 3.374MB/4.178MB 9.3s
⠹ b4c431d00c78 Download complete 9.3s
⠹ 2696974e2815 Download complete 9.3s
⠹ 564b77596399 Downloading 5.622MB/7.965MB 9.3s
⠹ 5044045cf6f2 Downloading 216.7kB/391.1kB 9.3s
⠹ d736e67e6ac3 Waiting 9.3s
⠹ 390c1c9a5ae4 Waiting 9.3s
⠹ c0e62f172284 Waiting 9.3s
⠹ ebcdc659c5bf Waiting 9.3s
⠹ 29be22cb3acc Waiting 9.3s
⠹ f63c47038e66 Waiting 9.3s
⠹ 77a0c198cde5 Waiting 9.3s
⠹ c8752d5b785c Waiting 9.3s
```
2023-01-03 10:54:03 +01:00
2023-10-31 11:50:42 +01:00
`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.
2021-03-08 15:47:24 +01:00
deprecated : false
2023-07-07 14:27:14 +02:00
hidden : false
2021-03-08 15:47:24 +01:00
experimental : false
experimentalcli : false
kubernetes : false
swarm : false