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.