Work around Docker 29.0.0 bug. (#1187)

This commit is contained in:
Felix Fontein
2025-11-12 19:21:55 +01:00
committed by GitHub
parent 94d22f758b
commit ec14568b22
2 changed files with 7 additions and 2 deletions
+5 -2
View File
@@ -126,13 +126,16 @@ class AnsibleDockerClientBase:
self._info: dict[str, t.Any] | None = None
if needs_api_version:
api_version_string = self._version["Server"].get(
"ApiVersion"
) or self._version["Server"].get("APIVersion")
if not isinstance(self._version.get("Server"), dict) or not isinstance(
self._version["Server"].get("ApiVersion"), str
api_version_string, str
):
self.fail(
"Cannot determine Docker Daemon information. Are you maybe using podman instead of docker?"
)
self.docker_api_version_str = to_text(self._version["Server"]["ApiVersion"])
self.docker_api_version_str = to_text(api_version_string)
self.docker_api_version = LooseVersion(self.docker_api_version_str)
min_docker_api_version = min_docker_api_version or "1.25"
if self.docker_api_version < LooseVersion(min_docker_api_version):