Sha256: ce94eee0a4d358e47b7cae1f485756993ecd5b8c0b53b726cb59a598dce1d1f7

Contents?: true

Size: 920 Bytes

Versions: 48

Compression:

Stored size: 920 Bytes

Contents

# frozen_string_literal: true

# takeltau docker container check existing
# tau docker container check existing
module DockerContainerCheckExisting
  # Backend method for docker container check existing.
  # @return [Boolean] is container existing?
  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

  private

  # Format command to check if docker container exists.
  def _docker_container_cmd_check_existing(container)
    format(
      config.active['cmd_docker_container_check_existing_docker_ps'],
      docker: config.active['cmd_docker'],
      container: container
    )
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
takeltau-0.46.9 lib/takeltau/docker/container/check/existing.rb
takeltau-0.46.8 lib/takeltau/docker/container/check/existing.rb
takeltau-0.46.5 lib/takeltau/docker/container/check/existing.rb
takeltau-0.46.1 lib/takeltau/docker/container/check/existing.rb
takeltau-0.46.0 lib/takeltau/docker/container/check/existing.rb
takeltau-0.45.27 lib/takeltau/docker/container/check/existing.rb
takeltau-0.45.26 lib/takeltau/docker/container/check/existing.rb
takeltau-0.45.24 lib/takeltau/docker/container/check/existing.rb
takeltau-0.45.23 lib/takeltau/docker/container/check/existing.rb
takeltau-0.45.22 lib/takeltau/docker/container/check/existing.rb
takeltau-0.45.21 lib/takeltau/docker/container/check/existing.rb
takeltau-0.45.19 lib/takeltau/docker/container/check/existing.rb
takeltau-0.45.17 lib/takeltau/docker/container/check/existing.rb
takeltau-0.45.16 lib/takeltau/docker/container/check/existing.rb
takeltau-0.45.14 lib/takeltau/docker/container/check/existing.rb
takeltau-0.45.13 lib/takeltau/docker/container/check/existing.rb
takeltau-0.45.12 lib/takeltau/docker/container/check/existing.rb
takeltau-0.45.11 lib/takeltau/docker/container/check/existing.rb
takeltau-0.45.10 lib/takeltau/docker/container/check/existing.rb
takeltau-0.45.9 lib/takeltau/docker/container/check/existing.rb