Module: DockerSync::Dependencies::Docker::Driver

Defined in:
lib/docker-sync/dependencies/docker_driver.rb

Class Method Summary collapse

Class Method Details

.docker_for_mac?Boolean

Returns:

  • (Boolean)

5
6
7
8
9
# File 'lib/docker-sync/dependencies/docker_driver.rb', line 5

def self.docker_for_mac?
  return false unless Environment.mac?
  return @docker_for_mac if defined? @docker_for_mac
  @docker_for_mac = system('pgrep -q com.docker.hyperkit')
end

.docker_toolbox?Boolean

Returns:

  • (Boolean)

11
12
13
14
15
16
# File 'lib/docker-sync/dependencies/docker_driver.rb', line 11

def self.docker_toolbox?
  return false unless Environment.mac? || Environment.freebsd?
  return false unless find_executable0('docker-machine')
  return @docker_toolbox if defined? @docker_toolbox
  @docker_toolbox = system('docker info | grep -q "Operating System: Boot2Docker"')
end