class Philae::DockerProbe

Attributes

name[R]

Public Class Methods

new(name, endpoint = '/var/run/docker.sock', options = nil) click to toggle source
# File lib/philae/docker_probe.rb, line 7
def initialize(name, endpoint = '/var/run/docker.sock', options = nil)
  @name = name
  @endpoint = endpoint
  @docker_options = options
end

Public Instance Methods

check() click to toggle source
# File lib/philae/docker_probe.rb, line 13
def check
  Docker.url = @endpoint
  Docker.options = @docker_options if !@docker_options.nil?
  begin
    Docker::Container.all
  rescue
    return { healthy: false, comment: 'Unable to communicate with docker' }
  end

  return { healthy: true, comment: '' }
end