Module: DockerContainerCheckExisting

Included in:
Takeltau::DockerContainer, Takeltau::DockerContainerCheck, Takeltau::InfoStatus, Takeltau::MutagenCheck, Takeltau::MutagenSocket
Defined in:
lib/takeltau/docker/container/check/existing.rb

Overview

takeltau docker container check existing tau docker container check existing

Instance Method Summary collapse

Instance Method Details

#docker_container_check_existing(container) ⇒ Boolean

Backend method for docker container check existing.

Returns:

  • (Boolean)

    is container existing?



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/takeltau/docker/container/check/existing.rb', line 8

def docker_container_check_existing(container)
  log.debug "Checking if container \"#{container}\" is existing"

  stdout_str = run _docker_container_cmd_check_existing container

  if stdout_str.to_s.chomp.empty?
    log.debug "Container \"#{container}\" is not existing"
    return false
  end

  log.debug "Container \"#{container}\" is existing"
  true
end