@@ -53,6 +53,36 @@ def is_minikube_installed() -> tuple[bool, str]:
53
53
except FileNotFoundError as err :
54
54
return False , str (err )
55
55
56
+ def is_minikube_running () -> tuple [bool , str ]:
57
+ try :
58
+ result = subprocess .run (
59
+ ["minikube" , "status" ],
60
+ capture_output = True ,
61
+ text = True ,
62
+ )
63
+ if result .returncode == 0 and "Running" in result .stdout :
64
+ return True , "minikube is running"
65
+ else :
66
+ return False , ""
67
+ except FileNotFoundError :
68
+ # Minikube command not found
69
+ return False , ""
70
+
71
+ def is_docker_running () -> tuple [bool , str ]:
72
+ try :
73
+ result = subprocess .run (
74
+ ["docker" , "info" ],
75
+ capture_output = True ,
76
+ text = True ,
77
+ )
78
+ if result .returncode == 0 :
79
+ return True , "docker is running"
80
+ else :
81
+ return False , ""
82
+ except FileNotFoundError :
83
+ # Docker command not found
84
+ return False , ""
85
+
56
86
def is_minikube_version_valid_on_darwin () -> tuple [bool , str ]:
57
87
try :
58
88
version_result = subprocess .run (
@@ -171,6 +201,18 @@ def check_installation(tool_info: ToolInfo) -> ToolStatus:
171
201
install_instruction = "Make sure Docker Desktop is installed and running." ,
172
202
install_url = "https://docs.docker.com/desktop/" ,
173
203
)
204
+ docker_running_info = ToolInfo (
205
+ tool_name = "Running Docker" ,
206
+ is_installed_func = is_docker_running ,
207
+ install_instruction = "Please make sure docker is running" ,
208
+ install_url = "https://docs.docker.com/engine/install/" ,
209
+ )
210
+ minikube_running_info = ToolInfo (
211
+ tool_name = "Running Minikube" ,
212
+ is_installed_func = is_minikube_running ,
213
+ install_instruction = "Please make sure minikube is running" ,
214
+ install_url = "https://minikube.sigs.k8s.io/docs/start/" ,
215
+ )
174
216
kubectl_info = ToolInfo (
175
217
tool_name = "Kubectl" ,
176
218
is_installed_func = is_kubectl_installed ,
@@ -223,11 +265,14 @@ def check_installation(tool_info: ToolInfo) -> ToolStatus:
223
265
if answers ["platform" ] == "Docker Desktop" :
224
266
check_results .append (check_installation (docker_info ))
225
267
check_results .append (check_installation (docker_desktop_info ))
268
+ check_results .append (check_installation (docker_running_info ))
226
269
elif answers ["platform" ] == "Minikube" :
227
270
check_results .append (check_installation (docker_info ))
271
+ check_results .append (check_installation (docker_running_info ))
228
272
check_results .append (check_installation (minikube_info ))
229
273
if is_platform_darwin ():
230
274
check_results .append (check_installation (minikube_version_info ))
275
+ check_results .append (check_installation (minikube_running_info ))
231
276
check_results .append (check_installation (kubectl_info ))
232
277
check_results .append (check_installation (helm_info ))
233
278
else :
0 commit comments