mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 09:52:37 +02:00
Only check Docker version if the container runtime is set to docker
This commit is contained in:
parent
c0215062bc
commit
f082641b71
1 changed files with 4 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue