Check if the Docker daemon is running.
()
| 1 | def is_docker_daemon_running(): |
| 2 | """ |
| 3 | Check if the Docker daemon is running. |
| 4 | """ |
| 5 | import docker |
| 6 | |
| 7 | try: |
| 8 | client = docker.from_env() |
| 9 | client.ping() |
| 10 | return True |
| 11 | except Exception: |
| 12 | return False |
no outgoing calls
no test coverage detected