Merge pull request #2851 from huogerac/issue836_better_docs

Update the Image.save documentation with a working example. Issue #836
This commit is contained in:
Mathieu Champlon 2021-06-29 08:53:34 +02:00 committed by GitHub
commit 650aad3a5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -84,9 +84,9 @@ class Image(Model):
Example:
>>> image = cli.get_image("busybox:latest")
>>> image = cli.images.get("busybox:latest")
>>> f = open('/tmp/busybox-latest.tar', 'wb')
>>> for chunk in image:
>>> for chunk in image.save():
>>> f.write(chunk)
>>> f.close()
"""