Sha256: c9e3017d0d31560914ee06e394a7cd4e4df98a1f7251fbd728ef5ce68e0df915
Contents?: true
Size: 762 Bytes
Versions: 12
Compression:
Stored size: 762 Bytes
Contents
module DockerSync module Dependencies module Docker DOCKER_NOT_AVAILABLE = 'Could not find Docker. Please install it (see https://docs.docker.com/compose/install/) and try again.'.freeze DOCKER_NOT_RUNNING = 'No docker daemon seems to be running. Did you start docker-engine / docker-for-mac / docker-machine?'.freeze def self.available? return @available if defined? @available @available = find_executable0('docker') end def self.running? return @running if defined? @running @running = system('docker ps &> /dev/null') end def self.ensure! raise(DOCKER_NOT_AVAILABLE) unless available? raise(DOCKER_NOT_RUNNING) unless running? end end end end
Version data entries
12 entries across 12 versions & 1 rubygems