'use strict';

var util = require('util');
var child_process = require('child_process');

async function checkIfDockerIsOperational(logger) {
  logger.info("Checking Docker status...");
  try {
    const runCheck = util.promisify(child_process.execFile);
    await runCheck("docker", ["info"], { shell: true });
    logger.info(
      "Docker is up and running. Proceed to starting up mkdocs server"
    );
    return true;
  } catch {
    logger.error(
      "Docker is not running. Exiting. Please check status of Docker daemon with `docker info` before re-running"
    );
    return false;
  }
}

exports.checkIfDockerIsOperational = checkIfDockerIsOperational;
//# sourceMappingURL=utils.cjs.js.map
