Skip to content
This repository has been archived by the owner on Mar 23, 2019. It is now read-only.

Docker ImageCollection.build() api has changed. It now returns a tuple #936

Open
dnene opened this issue Jun 5, 2018 · 2 comments
Open
Labels

Comments

@dnene
Copy link

dnene commented Jun 5, 2018

image = self.client.images.build(fileobj=tarball_file,

As per the commit docker/docker-py@631cc3c (4 months ago) the return value of build() now returns a tuple with the first item being the image. Hence

                image = self.client.images.build(fileobj=tarball_file,
                                                 custom_context=True,
                                                 tag=tag,
                                                 rm=True,
                                                 nocache=not cache)

Instead needs to be

                image,_ = self.client.images.build(fileobj=tarball_file,
                                                 custom_context=True,
                                                 tag=tag,
                                                 rm=True,
                                                 nocache=not cache)

?
Also do the dependencies need to be updated to ensure the correct version of docker-py gets installed with ansible container

@zskulcsar
Copy link

@dnene see #937 as they are related.

@dnene
Copy link
Author

dnene commented Jun 5, 2018

Yes, I did indeed notice that when surprisingly the code worked in debug mode .. so I had to hunt down the issue by stepping into the code 😃

@Voronenko Voronenko added the bug label Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants