Check if Docker is available.
(self)
| 26 | self.docker_available = self._check_docker() |
| 27 | |
| 28 | def _check_docker(self) -> bool: |
| 29 | """Check if Docker is available.""" |
| 30 | try: |
| 31 | result = subprocess.run( |
| 32 | [get_docker_command(), "version"], capture_output=True, timeout=5 |
| 33 | ) |
| 34 | return result.returncode == 0 |
| 35 | except (subprocess.SubprocessError, FileNotFoundError): |
| 36 | return False |
| 37 | |
| 38 | def select_runner(self) -> str: |
| 39 | """Select the best available runner. |
no test coverage detected