Method: EcsCmd::Exec.shell

Defined in:
lib/ecs_cmd/exec.rb

.shell(task_family, ip, shell = 'bash', user = 'root') ⇒ Object

used to open a shell within a container?



30
31
32
33
# File 'lib/ecs_cmd/exec.rb', line 30

def shell(task_family, ip, shell = 'bash', user = 'root')
  cmd = "docker exec -i -t -u #{user} `#{docker_ps_task(task_family)}` #{shell}"
  exec(ssh_cmd(ip) + " '#{cmd}' ")
end