Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Don't stop pull for images that can be built #10054

Merged
merged 1 commit into from
Dec 8, 2022
Merged

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Dec 8, 2022

What I did
Don't immediately stop pulling on failure for image that can be built: Wait for other pullable images to complete.
Only stop with immediate error if some image can't be pulled and has no build config.

➜  docker compose pull
[+] Running 2/4
 ⠿ tata Pulled                                                                                                             7.8s
   ⠿ e96e057aae67 Pull complete                                                                                            5.1s
 ⠿ titi Warning                                                                                                            2.1s
 ⠿ toto Warning                                                                                                            2.1s
WARNING: Some service image(s) must be built from source by running:
    docker compose build toto titi
2 errors occurred:
	* Error response from daemon: pull access denied for tot, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
	* Error response from daemon: pull access denied for tit, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

Note: this still eventually fails with a !=0 exit code. Maybe we should introduce a new flag to ignore pull failures on buildable services: docker compose pull --ignore-buildable, wdyt ?

Related issue
close #8724

(not mandatory) A picture of a cute animal, if possible in relation to what you did
image

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@codecov
Copy link

codecov bot commented Dec 8, 2022

Codecov Report

Base: 75.74% // Head: 75.74% // No change to project coverage 👍

Coverage data is based on head (0f1203c) compared to base (a4ac6ab).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##               v2   #10054   +/-   ##
=======================================
  Coverage   75.74%   75.74%           
=======================================
  Files           2        2           
  Lines         235      235           
=======================================
  Hits          178      178           
  Misses         50       50           
  Partials        7        7           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ndeloof ndeloof merged commit 0234e13 into docker:v2 Dec 8, 2022
@ndeloof ndeloof deleted the 8724 branch December 8, 2022 20:20
@floriangeigl
Copy link

floriangeigl commented Dec 18, 2022

hi @ndeloof - any chance that this broke the "--ignore-pull-failures" flag? I've always used it to pull images and ignore the one I build my self... but since the last update, it fails with

1 error occurred:
        * Error response from daemon: pull access denied for __________, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

I'm on Docker Compose version v2.14.1

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docker compose pull fails if any image is not pullable
3 participants