Skip to content

Commit fce9892

Browse files
bfirshshin-
authored andcommitted
Add example for tag()
Carrying #1120. Thanks @Faylixe! Signed-off-by: Ben Firshman <[email protected]>
1 parent e814a39 commit fce9892

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docker/api/image.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,11 @@ def tag(self, image, repository, tag=None, force=False):
469469
Raises:
470470
:py:class:`docker.errors.APIError`
471471
If the server returns an error.
472+
473+
Example:
474+
475+
>>> client.tag('ubuntu', 'localhost:5000/ubuntu', 'latest',
476+
force=True)
472477
"""
473478
params = {
474479
'tag': tag,

0 commit comments

Comments
 (0)