Sha256: 1172767bf77cb0a575af86636380044dc6a41acad7bf57d2464f8c893bbe0e24

Contents?: true

Size: 703 Bytes

Versions: 16

Compression:

Stored size: 703 Bytes

Contents

# frozen_string_literal: true

require 'rake_factory'

require_relative '../container'

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

      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

16 entries across 16 versions & 1 rubygems

Version Path
rake_docker-2.22.0.pre.3 lib/rake_docker/tasks/destroy.rb
rake_docker-2.22.0.pre.2 lib/rake_docker/tasks/destroy.rb
rake_docker-2.22.0.pre.1 lib/rake_docker/tasks/destroy.rb
rake_docker-2.21.0 lib/rake_docker/tasks/destroy.rb
rake_docker-2.20.0.pre.8 lib/rake_docker/tasks/destroy.rb
rake_docker-2.20.0.pre.7 lib/rake_docker/tasks/destroy.rb
rake_docker-2.20.0.pre.6 lib/rake_docker/tasks/destroy.rb
rake_docker-2.20.0.pre.5 lib/rake_docker/tasks/destroy.rb
rake_docker-2.20.0.pre.4 lib/rake_docker/tasks/destroy.rb
rake_docker-2.20.0.pre.3 lib/rake_docker/tasks/destroy.rb
rake_docker-2.20.0.pre.2 lib/rake_docker/tasks/destroy.rb
rake_docker-2.20.0.pre.1 lib/rake_docker/tasks/destroy.rb
rake_docker-2.19.0 lib/rake_docker/tasks/destroy.rb
rake_docker-2.18.0.pre.6 lib/rake_docker/tasks/destroy.rb
rake_docker-2.18.0.pre.5 lib/rake_docker/tasks/destroy.rb
rake_docker-2.18.0.pre.4 lib/rake_docker/tasks/destroy.rb