MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / is_docker_running

Function is_docker_running

camel/utils/commons.py:521–536  ·  view source on GitHub ↗

r"""Check if the Docker daemon is running. Returns: bool: True if the Docker daemon is running, False otherwise.

()

Source from the content-addressed store, hash-verified

519
520
521def is_docker_running() -> bool:
522 r"""Check if the Docker daemon is running.
523
524 Returns:
525 bool: True if the Docker daemon is running, False otherwise.
526 """
527 try:
528 result = subprocess.run(
529 ["docker", "info"],
530 check=True,
531 stdout=subprocess.PIPE,
532 stderr=subprocess.PIPE,
533 )
534 return result.returncode == 0
535 except (subprocess.CalledProcessError, FileNotFoundError):
536 return False
537
538
539try:

Callers 1

_initialize_if_neededMethod · 0.90

Calls 1

runMethod · 0.45

Tested by

no test coverage detected