+
Skip to content
This repository was archived by the owner on Mar 21, 2022. It is now read-only.
This repository was archived by the owner on Mar 21, 2022. It is now read-only.

docker.pull("imagename") causes docker daemon to pull all known tags of the image #873

@mattnworb

Description

@mattnworb

As seen in #857 (comment), pulling the name of an image repository without specifying a tag (such as dockerClient.pull("redis")) causes the docker daemon to pull all the tags that it can find of that image.

When dockerClient.pull("redis") is called, the client sends a request to the Docker Remote API like POST /images/create?fromImage=redis.

When no tag parameter is specified for the image pull/create, it seems like the daemon will try to pull all known tags from the repository, which appears to be behavior that isn't quite documented (but then again it is not clear which image should be pulled for this request).

When you do docker pull redis from the command line, the docker-cli sends the request POST /images/create?fromImage=redis&tag=latest - it interprets the tag-less image request as being :latest implicitly, but our DockerClient doesn't do the same.

It would probably make more sense for DefaultDockerClient to quietly interpret an image pull like "redis" as "redis:latest" to behave the same as docker pull, rather than sending POST /images/create?fromImage=redis to pull all known tags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载