Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Pull fails even if a service defines a build/context #5478

Closed
AnthonyMastrean opened this issue Dec 13, 2017 · 5 comments
Closed

Pull fails even if a service defines a build/context #5478

AnthonyMastrean opened this issue Dec 13, 2017 · 5 comments

Comments

@AnthonyMastrean
Copy link

AnthonyMastrean commented Dec 13, 2017

The docs say

If the image does not exist, Compose attempts to pull it, unless you have also specified build, in which case it builds it using the specified options and tags it with the specified tag.

https://docs.docker.com/compose/compose-file/#image

I have this minimal manifest:

version: '2'
services:
  scheduler:
    image: scheduler:local
    build:
      context: .

But, when I run pull, I get an error and pulling stops at that image (this is not a problem for the example, but for production manifests, it might stop pulling halfway through).

$ docker-compose pull
...
Pulling scheduler (scheduler:local)...
ERROR: pull access denied for scheduler, repository does not exist or may require 'docker login'

I guess I expected it to just pass by the scheduler service (in the case of the minimal example, it would just finish and do nothing else, in the case of a bigger manifest, it would continue pulling other service images).

@shin-
Copy link

shin- commented Dec 13, 2017

I believe you're looking for --ignore-pull-failures

@AnthonyMastrean
Copy link
Author

Yes, thank you!

@AnthonyMastrean
Copy link
Author

On further thought, using --ignore-pull-failures to avoid this error has the potential to hide real errors. Sure, you should read the console output, but that only works when you're running the command manually. It doesn't help in a scripted scenario where you're depending on the exit status.

If a service has a build section defined, then that indicates that there's no registry to pull from, right?

@mageekguy
Copy link

mageekguy commented Feb 6, 2018

Totally agree with @AnthonyMastrean!

@AnthonyMastrean
Copy link
Author

Related to #3660?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants