Sha256: 279126f7da8d2f87a5dac62f6647997bca323f54c92517e587e3a0d7711fddee
Contents?: true
Size: 594 Bytes
Versions: 5
Compression:
Stored size: 594 Bytes
Contents
command :unship do |c| c.summary = 'Removes all Docker containers defined for the host in '#{Ops::CONTAINERS_DIR}/[host_name].yml' c.syntax = 'ops ship [host_name]' c.description = "Removes all Docker containers defined for the host in '#{Ops::CONTAINERS_DIR}/[host_name].yml" c.example "", 'ops unship example.com' c.action do |args, options| host = args[0] user = Ops::get_user_for(host) Net::SSH.start(host, user) do |ssh| Docker::containers_for(host).each do |container_name, config| ssh.exec "docker rm -f #{container_name}" end end end end
Version data entries
5 entries across 5 versions & 1 rubygems