Sha256: a1d260f2d5bd80a4cdc4d73ba54070afd24dc3d6fc71015c7eebc3ad4367c247

Contents?: true

Size: 1.79 KB

Versions: 19

Compression:

Stored size: 1.79 KB

Contents

# frozen_string_literal: true

module Takelage
  # takelage docker container check
  class DockerContainerCheck < SubCommandBase
    include LoggingModule
    include SystemModule
    include ConfigModule
    include DockerCheckDaemon
    include DockerContainerCheckExisting
    include DockerContainerCheckNetwork
    include DockerContainerCheckOrphaned

    #
    # docker container check existing
    #
    desc 'existing [CONTAINER]', 'Check if docker [CONTAINER] is existing'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    Check if docker container is existing
    This check looks for a container with a given name.
    If such a container is existing the result is true else false.
    LONGDESC
    # Check if docker container is existing.
    def existing(container)
      exit docker_container_check_existing container
    end

    #
    # docker container check network
    #
    desc 'network [NETWORK]', 'Check if docker [NETWORK] is existing'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    Check if docker network is existing
    This check looks for a network with a given name.
    If such a network is existing the result is true else false.
    LONGDESC
    # Check if docker network is existing.
    def network(network)
      exit docker_container_check_network network
    end

    #
    # docker container check orphaned
    #
    desc 'orphaned [CONTAINER]', 'Check if docker [CONTAINER] is orphaned'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    Check if docker container is orphaned
    This check looks for a process which is started
    when you log in to an takelage docker container.
    If such a process is found the result is true else false.
    LONGDESC
    # Check if docker container is orphaned.
    def orphaned(container)
      exit docker_container_check_orphaned container
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
takelage-0.33.1 lib/takelage/docker/container/check/cli.rb
takelage-0.32.4 lib/takelage/docker/container/check/cli.rb
takelage-0.32.3 lib/takelage/docker/container/check/cli.rb
takelage-0.32.1 lib/takelage/docker/container/check/cli.rb
takelage-0.32.0 lib/takelage/docker/container/check/cli.rb
takelage-0.31.0 lib/takelage/docker/container/check/cli.rb
takelage-0.30.6 lib/takelage/docker/container/check/cli.rb
takelage-0.30.5 lib/takelage/docker/container/check/cli.rb
takelage-0.30.1 lib/takelage/docker/container/check/cli.rb
takelage-0.30.0 lib/takelage/docker/container/check/cli.rb
takelage-0.29.14 lib/takelage/docker/container/check/cli.rb
takelage-0.29.13 lib/takelage/docker/container/check/cli.rb
takelage-0.29.11 lib/takelage/docker/container/check/cli.rb
takelage-0.29.10 lib/takelage/docker/container/check/cli.rb
takelage-0.29.8 lib/takelage/docker/container/check/cli.rb
takelage-0.29.6 lib/takelage/docker/container/check/cli.rb
takelage-0.29.0 lib/takelage/docker/container/check/cli.rb
takelage-0.28.26 lib/takelage/docker/container/check/cli.rb
takelage-0.28.24 lib/takelage/docker/container/check/cli.rb