Skip to content

Commit 8813c3d

Browse files
authored
Merge pull request #2799 from feliperuhland/fix-low-level-pull-example
Fix images low-level documentation examples
2 parents 7a2ec95 + a34dd8b commit 8813c3d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docker/api/image.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def get_image(self, image, chunk_size=DEFAULT_DATA_CHUNK_SIZE):
3131
3232
Example:
3333
34-
>>> image = cli.get_image("busybox:latest")
34+
>>> image = client.api.get_image("busybox:latest")
3535
>>> f = open('/tmp/busybox-latest.tar', 'wb')
3636
>>> for chunk in image:
3737
>>> f.write(chunk)
@@ -379,7 +379,7 @@ def pull(self, repository, tag=None, stream=False, auth_config=None,
379379
380380
Example:
381381
382-
>>> for line in cli.pull('busybox', stream=True, decode=True):
382+
>>> for line in client.api.pull('busybox', stream=True, decode=True):
383383
... print(json.dumps(line, indent=4))
384384
{
385385
"status": "Pulling image (latest) from busybox",
@@ -458,7 +458,7 @@ def push(self, repository, tag=None, stream=False, auth_config=None,
458458
If the server returns an error.
459459
460460
Example:
461-
>>> for line in cli.push('yourname/app', stream=True, decode=True):
461+
>>> for line in client.api.push('yourname/app', stream=True, decode=True):
462462
... print(line)
463463
{'status': 'Pushing repository yourname/app (1 tags)'}
464464
{'status': 'Pushing','progressDetail': {}, 'id': '511136ea3c5a'}
@@ -549,7 +549,7 @@ def tag(self, image, repository, tag=None, force=False):
549549
550550
Example:
551551
552-
>>> client.tag('ubuntu', 'localhost:5000/ubuntu', 'latest',
552+
>>> client.api.tag('ubuntu', 'localhost:5000/ubuntu', 'latest',
553553
force=True)
554554
"""
555555
params = {

0 commit comments

Comments
 (0)