checkDaemon method

  1. @override
Future<bool> checkDaemon()
override

Checks if Docker daemon is running.

Implementation

@override
Future<bool> checkDaemon() async {
  _log.info('Check Docker Daemon: $dockerBinaryPath info');

  var process = Process.run(dockerBinaryPath!, <String>['info']);
  var result = await process;

  var ok = result.exitCode == 0;

  if (!ok) {
    _log.warning('Error checking Docker Daemon:');
    _log.warning(result.stdout);
  }

  return ok;
}