From f082641b7161feb5b90d11eaf3d75c6df6508d75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Mon, 24 Mar 2025 17:52:03 +0100 Subject: [PATCH] Only check Docker version if the container runtime is set to docker --- dangerzone/isolation_provider/container.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dangerzone/isolation_provider/container.py b/dangerzone/isolation_provider/container.py index c133442..cbb930a 100644 --- a/dangerzone/isolation_provider/container.py +++ b/dangerzone/isolation_provider/container.py @@ -143,7 +143,10 @@ class Container(IsolationProvider): def check_docker_desktop_version(self) -> Tuple[bool, str]: # On windows and darwin, check that the minimum version is met version = "" - if platform.system() != "Linux": + runtime_is_docker = container_utils.get_runtime_name() == "docker" + platform_is_not_linux = platform.system() != "Linux" + + if runtime_is_docker and platform_is_not_linux: with subprocess.Popen( ["docker", "version", "--format", "{{.Server.Platform.Name}}"], stdout=subprocess.PIPE,