Class: LabSystem::DockerCommand

Inherits:
DevSystem::Command show all
Defined in:
lib/lab_system/commands/docker_command.rb

Class Method Summary collapse

Methods inherited from DevSystem::Command

#call, get_command_signatures

Methods inherited from Liza::Controller

color, inherited, on_connected

Methods inherited from Liza::Unit

const_missing, division, part, system, #system, test_class

Class Method Details

.call(args) ⇒ Object

liza docker



5
6
7
8
9
# File 'lib/lab_system/commands/docker_command.rb', line 5

def self.call args
  log "args = #{args.inspect}"

  log "not implemented"
end

.hello(args) ⇒ Object

liza docker:hello



19
20
21
22
23
24
25
26
# File 'lib/lab_system/commands/docker_command.rb', line 19

def self.hello args
  t = Time.now
  log "args = #{args.inspect}"

  DockerShell.alpine_hello
ensure
  log "#{t.diff} | done"
end

.kroki(args) ⇒ Object

liza docker:kroki



13
14
15
# File 'lib/lab_system/commands/docker_command.rb', line 13

def self.kroki args
  KrokiDockerShell.start_blocking_server
end

.version(args) ⇒ Object

liza docker:version



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/lab_system/commands/docker_command.rb', line 30

def self.version args
  log "args = #{args.inspect}"

  h = DockerShell.version

  log "h.keys = #{h.keys.inspect}"

  puts

  log "Client"

  log_hash h["Client"]

  puts

  log "Server"
  log "Name = #{h["Server"]["Name"]}"
  puts
  log "Engine"
  log_hash h["Server"]["Engine"]
  puts
  log "containerd"
  log_hash h["Server"]["containerd"]
  puts
  log "runc"
  log_hash h["Server"]["runc"]
  puts
  log "docker-init"
  log_hash h["Server"]["docker-init"]
end