Sha256: 38357a5abb682b2daa5d5890a9d376b9caf2194101ccee9263bec37e955f5bb6
Contents?: true
Size: 884 Bytes
Versions: 6
Compression:
Stored size: 884 Bytes
Contents
# frozen_string_literal: true # takeltau 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" return false unless docker_check_daemon 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'], container: container ) end end
Version data entries
6 entries across 6 versions & 1 rubygems