This repository was archived by the owner on Nov 27, 2023. It is now read-only.
Add --dry-run option to pull cmd#1818
Open
satotake wants to merge 1 commit intodocker-archive:mainfrom
Open
Conversation
satotake
commented
Jun 20, 2021
| } | ||
|
|
||
| func (s *composeService) getLocalImagesDigests(ctx context.Context, project *types.Project) (map[string]string, error) { | ||
| func (s *composeService) getLocalImagesIDs(ctx context.Context, project *types.Project) (map[string]string, error) { |
Author
There was a problem hiding this comment.
Image ID is different from RepoDigests values. I was confused and renamed it.
8d64724 to
8e1c113
Compare
Author
Hi maintainers. |
Signed-off-by: GitHub <noreply@github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Add
--dry-runoption topullcommand.Our final goal is adding the
--dry-runtoupand I started with the case ofpullat first.This is a proposal.
Example usage
Details
$ 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.