Class: Takeltau::DockerContainer

Overview

tau docker container

Instance Method Summary collapse

Methods included from MutagenSocketTerminate

#mutagen_socket_terminate

Methods included from MutagenSocketDocker

#mutagen_socket_docker

Methods included from MutagenSocketCreate

#mutagen_socket_create

Methods included from MutagenSocketCheck

#mutagen_socket_check

Methods included from MutagenCheckDaemon

#mutagen_check_daemon

Methods included from DockerImageTagCheck

#docker_image_tag_check

Methods included from DockerImageTagList

#docker_image_tag_list

Methods included from DockerImageTagLatest

#docker_image_tag_latest

Methods included from DockerContainerPrune

#docker_container_prune

Methods included from DockerContainerClean

#docker_container_clean

Methods included from DockerContainerLogin

#docker_container_login

Methods included from DockerContainerList

#docker_container_list

Methods included from DockerContainerDaemon

#docker_container_daemon

Methods included from DockerContainerCommand

#docker_container_command

Methods included from DockerContainerCheckOrphaned

#docker_container_check_orphaned

Methods included from DockerContainerCheckNetwork

#docker_container_check_network

Methods included from DockerContainerCheckExisting

#docker_container_check_existing

Methods included from DockerCheckDaemon

#docker_check_daemon

Methods included from ConfigModule

#config, #configured?, #initialize_config

Methods included from SystemModule

#command_available_else_error?, #hash_to_yaml, #read_yaml_erb_file, #read_yaml_file, #rm_fr, #run, #run_and_capture, #run_and_exit, #run_and_fork, #try, #write_file

Methods included from LoggingModule

#initialize_logging, #log

Methods inherited from SubCommandBase

banner, subcommand_prefix

Constructor Details

#initialize(args = [], local_options = {}, configuration = {}) ⇒ DockerContainer

Initialize docker container rubocop:disable Metrics/AbcSize



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/takeltau/docker/container/cli.rb', line 31

def initialize(args = [], local_options = {}, configuration = {})
  # initialize thor parent class
  super

  @docker_user = config.active['docker_user']
  @docker_repo = config.active['docker_repo']
  @docker_tag = config.active['docker_tag']
  @docker_registry = config.active['docker_registry']
  @username = ENV['USER'] || 'noname'
  @workdir = Dir.getwd
  @hostname = _docker_container_lib_hostname
  @hostlabel = "hostname=#{@hostname}"
  @takellabel = config.active['mutagen_socket_takelage_label']
  @dockersock_host = config.active['mutagen_socket_path_docker_host']
  @mutagensock_container = config.active['mutagen_socket_path_mutagen_container']
  @mutagensock_host = config.active['mutagen_socket_path_mutagen_host']
  @gpgsock_container = config.active['mutagen_socket_path_gpg_container']
  @gpgsock_host = config.active['mutagen_socket_path_gpg_host']
  @sshsock_container = config.active['mutagen_socket_path_ssh_container']
  @sshsock_host = config.active['mutagen_socket_path_ssh_host']
end

Instance Method Details

#cleanObject

Remove all docker containers.



65
66
67
# File 'lib/takeltau/docker/container/cli.rb', line 65

def clean
  docker_container_clean
end

#command(command) ⇒ Object

Run command in docker container.



77
78
79
# File 'lib/takeltau/docker/container/cli.rb', line 77

def command(command)
  docker_container_command(command)
end

#daemonObject

Run docker container in daemon mode.



89
90
91
# File 'lib/takeltau/docker/container/cli.rb', line 89

def daemon
  docker_container_daemon
end

#listObject

List docker containers.



101
102
103
104
# File 'lib/takeltau/docker/container/cli.rb', line 101

def list
  say docker_container_list
  true
end

#loginObject

Log in to latest local docker container.



119
120
121
# File 'lib/takeltau/docker/container/cli.rb', line 119

def 
  
end

#pruneObject

Remove orphaned docker containers.



131
132
133
# File 'lib/takeltau/docker/container/cli.rb', line 131

def prune
  docker_container_prune
end