ansible / ansible-container

DEPRECATED -- Ansible Container was a tool to build Docker images and orchestrate containers using only Ansible playbooks.
GNU Lesser General Public License v3.0
2.19k stars 394 forks source link

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

Open dnene opened 6 years ago

dnene commented 6 years ago

https://github.com/ansible/ansible-container/blob/2fa778a7c8d1699672314ac0b89c53554f435cb7/container/docker/engine.py#L1151

As per the commit https://github.com/docker/docker-py/commit/631cc3c1215441edb075a999a77061c1275c5e5a (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 commented 6 years ago

@dnene see https://github.com/ansible/ansible-container/issues/937 as they are related.

dnene commented 6 years ago

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 :smiley: