[2.7] docker_container: fix support for docker-py 1.7.0 #55496
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
docker_container, docker_image and docker_image_facts in stable-2.7 are supposed to support docker-py 1.7.0. Unfortunately, docker_container will always crash when creating a container, and docker_image will crash when pulling or pushing. This is no longer relevant for 2.8, since the minimal docker-py requirement has been bumped to 1.8.0 in general, and 1.10.0 for docker_image.
The pushing/pulling is a bit harder to fix, but the crash for docker_container can be easily fixed. This PR fixes the crash for docker_container and updates the tests so that they will also run for docker-py 1.7.0.
This is not a backport!
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
docker_container
docker_image
docker_image_facts