Class: Takeltau::DockerContainer
- Inherits:
-
SubCommandBase
- Object
- Thor
- SubCommandBase
- Takeltau::DockerContainer
- Includes:
- ConfigModule, DockerCheckDaemon, DockerContainerCheckExisting, DockerContainerCheckNetwork, DockerContainerCheckOrphaned, DockerContainerClean, DockerContainerCommand, DockerContainerDaemon, DockerContainerLib, DockerContainerList, DockerContainerLogin, DockerContainerPrune, DockerImageTagCheck, DockerImageTagLatest, DockerImageTagList, LoggingModule, MutagenCheckDaemon, MutagenSocketCheck, MutagenSocketCreate, MutagenSocketDocker, MutagenSocketTerminate, SystemModule
- Defined in:
- lib/takeltau/docker/container/cli.rb
Overview
tau docker container
Instance Method Summary collapse
-
#clean ⇒ Object
Remove all docker containers.
-
#command(command) ⇒ Object
Run command in docker container.
-
#daemon ⇒ Object
Run docker container in daemon mode.
-
#initialize(args = [], local_options = {}, configuration = {}) ⇒ DockerContainer
constructor
Initialize docker container rubocop:disable Metrics/AbcSize.
-
#list ⇒ Object
List docker containers.
-
#login ⇒ Object
Log in to latest local docker container.
-
#prune ⇒ Object
Remove orphaned docker containers.
Methods included from MutagenSocketTerminate
Methods included from MutagenSocketDocker
Methods included from MutagenSocketCreate
Methods included from MutagenSocketCheck
Methods included from MutagenCheckDaemon
Methods included from DockerImageTagCheck
Methods included from DockerImageTagList
Methods included from DockerImageTagLatest
Methods included from DockerContainerPrune
Methods included from DockerContainerClean
Methods included from DockerContainerLogin
Methods included from DockerContainerList
Methods included from DockerContainerDaemon
Methods included from DockerContainerCommand
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
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
Methods inherited from SubCommandBase
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 = [], = {}, 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
#clean ⇒ Object
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 |
#daemon ⇒ Object
Run docker container in daemon mode.
89 90 91 |
# File 'lib/takeltau/docker/container/cli.rb', line 89 def daemon docker_container_daemon end |
#list ⇒ Object
List docker containers.
101 102 103 104 |
# File 'lib/takeltau/docker/container/cli.rb', line 101 def list say docker_container_list true end |
#login ⇒ Object
Log in to latest local docker container.
119 120 121 |
# File 'lib/takeltau/docker/container/cli.rb', line 119 def login docker_container_login end |
#prune ⇒ Object
Remove orphaned docker containers.
131 132 133 |
# File 'lib/takeltau/docker/container/cli.rb', line 131 def prune docker_container_prune end |