Skip to content

Commit aed5700

Browse files
author
aiordache
committed
update pull method docs
Signed-off-by: aiordache <[email protected]>
1 parent cec152d commit aed5700

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

docker/api/image.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,8 @@ def pull(self, repository, tag=None, stream=False, auth_config=None,
349349
350350
Args:
351351
repository (str): The repository to pull
352-
tag (str): The tag to pull
352+
tag (str): The tag to pull. If ``tag`` is ``None`` or empty, it
353+
is set to ``latest``.
353354
stream (bool): Stream the output as a generator. Make sure to
354355
consume the generator, otherwise pull might get cancelled.
355356
auth_config (dict): Override the credentials that are found in the
@@ -358,7 +359,8 @@ def pull(self, repository, tag=None, stream=False, auth_config=None,
358359
decode (bool): Decode the JSON data from the server into dicts.
359360
Only applies with ``stream=True``
360361
platform (str): Platform in the format ``os[/arch[/variant]]``
361-
all_tags (bool): Pull all image tags.
362+
all_tags (bool): Pull all image tags, the ``tag`` parameter is
363+
ignored.
362364
363365
Returns:
364366
(generator or str): The output

docker/models/images.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ def pull(self, repository, tag=None, all_tags=False, **kwargs):
399399
"""
400400
Pull an image of the given name and return it. Similar to the
401401
``docker pull`` command.
402+
If ``tag`` is ``None`` or empty, it is set to ``latest``.
402403
If ``all_tags`` is set, the ``tag`` parameter is ignored and all image
403404
tags will be pulled.
404405
@@ -417,7 +418,7 @@ def pull(self, repository, tag=None, all_tags=False, **kwargs):
417418
418419
Returns:
419420
(:py:class:`Image` or list): The image that has been pulled.
420-
If ``tag`` is None, the method will return a list
421+
If ``all_tags`` is True, the method will return a list
421422
of :py:class:`Image` objects belonging to this repository.
422423
423424
Raises:

0 commit comments

Comments
 (0)