Sha256: fdb202396d42d98ec1666070d4241bb2296eaf9ea984bf68203982d44f958207

Contents?: true

Size: 724 Bytes

Versions: 11

Compression:

Stored size: 724 Bytes

Contents

# frozen_string_literal: true

# takelage docker check daemon
module DockerCheckDaemon
  # Backend method for docker check daemon.
  # @return [Boolean] is the docker daemon running?
  # rubocop:disable Metrics/MethodLength
  def docker_check_daemon
    return true if @docker_daemon_running

    return false unless command_available? 'docker'

    log.debug 'Check if the docker daemon is running'

    status = try config.active['cmd_docker_check_daemon_docker_info']

    unless status.exitstatus.zero?
      log.error 'The docker daemon is not running'
      return false
    end

    log.debug 'The docker daemon is running'
    @docker_daemon_running = true
    true
  end
  # rubocop:enable Metrics/MethodLength
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
takelage-0.30.1 lib/takelage/docker/check/daemon.rb
takelage-0.30.0 lib/takelage/docker/check/daemon.rb
takelage-0.29.14 lib/takelage/docker/check/daemon.rb
takelage-0.29.13 lib/takelage/docker/check/daemon.rb
takelage-0.29.11 lib/takelage/docker/check/daemon.rb
takelage-0.29.10 lib/takelage/docker/check/daemon.rb
takelage-0.29.8 lib/takelage/docker/check/daemon.rb
takelage-0.29.6 lib/takelage/docker/check/daemon.rb
takelage-0.29.0 lib/takelage/docker/check/daemon.rb
takelage-0.28.26 lib/takelage/docker/check/daemon.rb
takelage-0.28.24 lib/takelage/docker/check/daemon.rb