compose-cli
compose-cli copied to clipboard
Add --dry-run option to pull cmd
What I did
Add --dry-run
option to pull
command.
Our final goal is adding the --dry-run
to up
and I started with the case of pull
at first.
This is a proposal.
Example usage
$ docker compose --project-directory local/e2e/compose/fixtures/dry-run-test/pull/ pull --dry-run
SERVICE IMAGE PLAN REMOTE DIGEST
expectedFetch hello-world fetch sha256:9f6ad537c5132bcce57f7a0a20e317228d382c3cd61edae14650eec68b2b345c
expectedSkip alpine skip sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0
expectedFail expected-not-to-be-registered fail <none>
$ docker compose --project-directory local/e2e/compose/fixtures/dry-run-test/pull/ pull --dry-run --format json
{
"Services": [
{
"Name": "expectedSkip",
"Image": "alpine",
"LocalDigests": [
"sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0"
],
"DistributionDigest": "sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0",
"Plan": "skip"
},
{
"Name": "expectedFail",
"Image": "expected-not-to-be-registered",
"LocalDigests": [],
"DistributionDigest": "",
"Plan": "fail"
},
{
"Name": "expectedFetch",
"Image": "hello-world",
"LocalDigests": [],
"DistributionDigest": "sha256:9f6ad537c5132bcce57f7a0a20e317228d382c3cd61edae14650eec68b2b345c",
"Plan": "fetch"
}
]
}
Related issue https://github.com/docker/compose-cli/issues/1090
UPDATE: Example usages' style was broken. fixed.
First-time contributors need a maintainer to approve running workflows.
Hi maintainers. Could you run workflows again?