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

Version Path
open-dock-0.0.15 lib/open-dock/commands/unship_host.rb
open-dock-0.0.14 lib/open-dock/commands/unship_host.rb
open-dock-0.0.13 lib/open-dock/commands/unship_host.rb
open-dock-0.0.12 lib/open-dock/commands/unship_host.rb
open-dock-0.0.11 lib/open-dock/commands/unship_host.rb