Sha256: 865c8ecb5649442a9182290be051231ba9a823ba1c42369116d941f5d69320fd

Contents?: true

Size: 754 Bytes

Versions: 6

Compression:

Stored size: 754 Bytes

Contents

# frozen_string_literal: true

# takeltau 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_else_error? config.active['cmd_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

6 entries across 6 versions & 1 rubygems

Version Path
takeltau-0.34.15 lib/takeltau/docker/check/daemon.rb
takeltau-0.34.14 lib/takeltau/docker/check/daemon.rb
takeltau-0.34.13 lib/takeltau/docker/check/daemon.rb
takeltau-0.34.12 lib/takeltau/docker/check/daemon.rb
takeltau-0.34.11 lib/takeltau/docker/check/daemon.rb
takeltau-0.34.9 lib/takeltau/docker/check/daemon.rb