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
5 6 7 8 9 10 11 12 13 |
# 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 # com.docker.hyperkit for old virtualization engine # com.docker.virtualization for new virtualization engine # see https://docs.docker.com/desktop/mac/#enable-the-new-apple-virtualization-framework @docker_for_mac = Environment.system('pgrep -q com.docker.hyperkit') || Environment.system('pgrep -q com.docker.virtualization') end |
.docker_toolbox? ⇒ Boolean
15 16 17 18 19 20 |
# File 'lib/docker-sync/dependencies/docker_driver.rb', line 15 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 = Environment.system('docker info | grep -q "Operating System: Boot2Docker"') end |