MCPcopy Create free account
hub / github.com/FastLED/FastLED / attempt_start_docker

Function attempt_start_docker

ci/util/docker_helper.py:38–63  ·  view source on GitHub ↗

Attempt to start Docker if it's not running. Returns: Tuple of (success, message) - success: True if Docker is now running, False otherwise - message: Explanation of what was attempted/result

()

Source from the content-addressed store, hash-verified

36
37
38def attempt_start_docker() -> tuple[bool, str]:
39 """Attempt to start Docker if it's not running.
40
41 Returns:
42 Tuple of (success, message)
43 - success: True if Docker is now running, False otherwise
44 - message: Explanation of what was attempted/result
45 """
46 # If Docker is already running, return success
47 if is_docker_available():
48 return True, "Docker is already running"
49
50 # Check if Docker is installed at all
51 if not is_docker_installed():
52 return (
53 False,
54 "Docker is not installed. Please install Docker Desktop from https://www.docker.com/products/docker-desktop",
55 )
56
57 # Try platform-specific Docker startup
58 if sys.platform == "win32":
59 return _start_docker_windows()
60 elif sys.platform == "darwin":
61 return _start_docker_macos()
62 else:
63 return _start_docker_linux()
64
65
66def _check_wsl2_docker_backend() -> tuple[bool, str]:

Callers 1

ensure_docker_runningMethod · 0.90

Calls 5

is_docker_availableFunction · 0.90
is_docker_installedFunction · 0.85
_start_docker_windowsFunction · 0.85
_start_docker_macosFunction · 0.85
_start_docker_linuxFunction · 0.85

Tested by

no test coverage detected