Skip to content

Conversation

@hristog
Copy link
Contributor

@hristog hristog commented May 24, 2020

Description

This fixes the Image.save() example (see original listing in the appendix below) by actually calling the save method.
The example doesn't seem to work, otherwise, due to the image object not being iterable.

Reference version:

>>> import docker >>> docker.__version__ '4.3.0-dev'

Appendix A: Original example listing

 Example: >>> image = cli.get_image("busybox:latest") >>> f = open('/tmp/busybox-latest.tar', 'wb') >>> for chunk in image: >>> f.write(chunk) >>> f.close()
Signed-off-by: Hristo Georgiev <hristo.a.georgiev@gmail.com>
@milas milas merged commit 52fb276 into docker:main Jul 29, 2022
@milas milas added this to the 6.0.0 milestone Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants