Sha256: 1eae21f27bd07977ebe0266a93a9330ced964dc23864676bdd7ca860c2cd5b58

Contents?: true

Size: 666 Bytes

Versions: 33

Compression:

Stored size: 666 Bytes

Contents

require 'rake_factory'

require_relative '../container'

module RakeDocker
  module Tasks
    class Destroy < RakeFactory::Task
      default_name :destroy
      default_description RakeFactory::DynamicValue.new { |t|
        "Destroy #{t.container_name ? "#{t.container_name} " : ""}container."
      }

      parameter :container_name, :required => true

      parameter :reporter, default: Container::PrintingReporter.new

      action do |t|
        puts "Destroying #{t.container_name} container"
        destroyer = Container::Destroyer.new(
            t.container_name,
            reporter: t.reporter)
        destroyer.execute
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
rake_docker-2.18.0.pre.3 lib/rake_docker/tasks/destroy.rb
rake_docker-2.18.0.pre.2 lib/rake_docker/tasks/destroy.rb
rake_docker-2.18.0.pre.1 lib/rake_docker/tasks/destroy.rb
rake_docker-2.17.0 lib/rake_docker/tasks/destroy.rb
rake_docker-2.16.0.pre.1 lib/rake_docker/tasks/destroy.rb
rake_docker-2.15.0 lib/rake_docker/tasks/destroy.rb
rake_docker-2.14.0.pre.4 lib/rake_docker/tasks/destroy.rb
rake_docker-2.14.0.pre.3 lib/rake_docker/tasks/destroy.rb
rake_docker-2.14.0.pre.2 lib/rake_docker/tasks/destroy.rb
rake_docker-2.14.0.pre.1 lib/rake_docker/tasks/destroy.rb
rake_docker-2.13.0 lib/rake_docker/tasks/destroy.rb
rake_docker-2.12.0.pre.2 lib/rake_docker/tasks/destroy.rb
rake_docker-2.12.0.pre.1 lib/rake_docker/tasks/destroy.rb
rake_docker-2.11.0 lib/rake_docker/tasks/destroy.rb
rake_docker-2.10.0.pre.1 lib/rake_docker/tasks/destroy.rb
rake_docker-2.9.0 lib/rake_docker/tasks/destroy.rb
rake_docker-2.8.0.pre.1 lib/rake_docker/tasks/destroy.rb
rake_docker-2.7.0 lib/rake_docker/tasks/destroy.rb
rake_docker-2.6.0.pre.1 lib/rake_docker/tasks/destroy.rb
rake_docker-2.5.0 lib/rake_docker/tasks/destroy.rb