Skip to content

"docker pull library-image:tag" doesn't pull all aliases #8689

Closed

Description

@tianon

Looks like v2 didn't get #8193 like it should've:

$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
$ docker pull mongo:2.6
mongo:2.6: The image you are pulling has been verified
511136ea3c5a: Pull complete 
5a7d9470be44: Pull complete 
feb755848a9a: Pull complete 
1627d948a24f: Pull complete 
fa822d72bf37: Pull complete 
49b4737cc97a: Pull complete 
eb6f031b83d2: Pull complete 
b251ce5098a8: Pull complete 
b4ddce5f31a3: Pull complete 
839e041c9eec: Pull complete 
52422a1b50e1: Pull complete 
5d63fb31d79d: Pull complete 
60d391ff57d4: Pull complete 
97d8b6dd3b57: Pull complete 
Status: Downloaded newer image for mongo:2.6
$ docker images mongo
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
mongo               2.6                 97d8b6dd3b57        5 days ago          391.4 MB
$ docker pull stackbrew/mongo:2.6
Pulling repository stackbrew/mongo
97d8b6dd3b57: Download complete 
511136ea3c5a: Download complete 
5a7d9470be44: Download complete 
feb755848a9a: Download complete 
1627d948a24f: Download complete 
fa822d72bf37: Download complete 
49b4737cc97a: Download complete 
eb6f031b83d2: Download complete 
b251ce5098a8: Download complete 
b4ddce5f31a3: Download complete 
839e041c9eec: Download complete 
52422a1b50e1: Download complete 
5d63fb31d79d: Download complete 
60d391ff57d4: Download complete 
Status: Image is up to date for stackbrew/mongo:2.6
$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
mongo               2.6                 97d8b6dd3b57        5 days ago          391.4 MB
stackbrew/mongo     2                   97d8b6dd3b57        5 days ago          391.4 MB
stackbrew/mongo     2.6                 97d8b6dd3b57        5 days ago          391.4 MB
stackbrew/mongo     latest              97d8b6dd3b57        5 days ago          391.4 MB
stackbrew/mongo     2.6.5               97d8b6dd3b57        5 days ago          391.4 MB

Activity

  1. dmp42 commented on Oct 22, 2014

    @dmp42
    Contributor
  2. dmcgowan commented on Oct 22, 2014

    @dmcgowan
    Member

    This one will require more thought for the V2 design. Since each tag is an independent image individually signed, pulling multiple tags for the current design would involve pulling and verifying multiple manifests. V2 also currently has no "image id" to map to tags except by pulling out the V1 image ids from the manifest history. To implement this in V2 would likely involve a change to the image format to introduce the concept of an "alias", requiring an index on V2 registries would not be an ideal solution.

  3. dmp42 commented on Oct 22, 2014

    @dmp42
    Contributor

    Agreed.
    @shykes what do you think?

  4. thaJeztah commented on Oct 22, 2014

    @thaJeztah
    Member

    Many base images currently handle tags as aliases. If using a different "alias" (eg use ubuntu:latest in stead of ubuntu:14.04) produces a different result because images are out of sync, that would really be a step backwards.

    Additionally, If image-ids for aliases no longer match, how (as an end-user) can I find out which images are supposed to be an alias?

  5. thaJeztah commented on Nov 5, 2014

    @thaJeztah
    Member

    @dmcgowan Any update on this from the registry side? Wondering if this regression is temporary or should be considered permanent.

    Could the signing/aliasing problem be circumvented / make it easier if all aliases would be created at the same time (i.e., allow multiple tags on a push, docker push image:tag1 -t image:tag2 image:tag3) so that the images are pushed (and signed) only once, but replicated/registered under multiple tags ?

    I don't want to deviate from the main topic here, but would like to get clear what is required to get this functionality back.

  6. dmcgowan commented on Nov 5, 2014

    @dmcgowan
    Member

    No update, from the registry side we plan no changes to introduce any indexing to alleviate this issue. The change would likely involve an update to the image format and behavior on the daemon to support it. Whether this is desired behavior and will be changed is still up for discussion, and I have no opinion one way or the other.

  7. thaJeztah commented on Nov 5, 2014

    @thaJeztah
    Member

    Thanks for the update, Derek. I realise there's a "conflict" of issues here; security (signing) and more user-centric; being able to update / get those images and keep em in sync.

  8. thaJeztah commented on Jan 18, 2015

    @thaJeztah
    Member

    Would it be possible to get a status update on this?

    If this is a "won't fix" (because of registry V2), I think the feature should be removed entirely.

    I'm happy to make a PR to update the docs, add a note to the change-log and can have a look at reverting the changes that implemented this feature.

  9. bobrik commented on Feb 3, 2015

    @bobrik
    Contributor

    If we're not having this in v2 then let's make v1 faster too: #8141 (comment)

  10. dmcgowan commented on Feb 3, 2015

    @dmcgowan
    Member

    @bobrik curious what your use case is that requires this feature? Getting the tag list will definitely be faster in v2, just in v2 we have no concept of considering two tags equivalent.

  11. bobrik commented on Feb 3, 2015

    @bobrik
    Contributor

    @dmcgowan follow the link and read the math behind my use case. I want to use docker in production, but I can't.

  12. dmcgowan commented on Feb 3, 2015

    @dmcgowan
    Member

    I saw the math, I was confused about is whether you are requesting this feature for v2 (pull all aliases) or mentioning that the existence of this feature in v1 is causing a performance issue. My original question was asking what your use case for needing aliases is. I understand that if pulling the tags is slow that is a problem, and likely should be separated out from this discussion.

  13. bobrik commented on Feb 3, 2015

    @bobrik
    Contributor

    I don't need aliases te be in sync. I was trying to say that since in v2 there will be no such feature, it should be disabled in v1 too. That would fix one of my problems.

    Sorry for confusion, I just tried to raise awareness to avoid performance issues in the future (and preferably in the present too).

    I can create a separate issue to discuss disabling tag fetching in v1 if that could happen.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions