Class: ContainersManager::DockerService

Inherits:
Object
  • Object
show all
Defined in:
lib/containers_manager/services/docker_service.rb

Constant Summary collapse

ALIVE_CONTAINER_ID_CMD =
'docker ps -q'

Instance Method Summary collapse

Constructor Details

#initialize(configuration) ⇒ DockerService

Returns a new instance of DockerService.



5
6
7
# File 'lib/containers_manager/services/docker_service.rb', line 5

def initialize(configuration)
  @configuration = configuration
end

Instance Method Details

#alive_idsObject



9
10
11
# File 'lib/containers_manager/services/docker_service.rb', line 9

def alive_ids
  system_call(ALIVE_CONTAINER_ID_CMD).split("\n")
end