Added --all to regenerate all available containers.
This commit is contained in:
parent
61b3f2b98a
commit
33a8df5ac1
5
dup.rb
5
dup.rb
@ -115,6 +115,7 @@ def action_help
|
||||
puts "-l, --list Lists all available containers."
|
||||
puts " --host Starts a container with net: host - which implies not using ports, networks and/or links."
|
||||
puts " --regenerate Generates YAML content from a running container."
|
||||
puts " --all Use all containers defined in yml files."
|
||||
puts "-v, --verbose More verbose output."
|
||||
exit 1
|
||||
end
|
||||
@ -442,10 +443,12 @@ opts.each do |opt, arg|
|
||||
action = :regenerate
|
||||
when '--verbose'
|
||||
$verbose = true
|
||||
when '--all'
|
||||
container = Dir[$base_dir + "/*.yml"].sort.map{|f| Container.new(File.basename(f, ".yml"))}
|
||||
end
|
||||
end
|
||||
|
||||
container = ARGV.map{|c| Container.new(c)}
|
||||
container ||= ARGV.map{|c| Container.new(c)}
|
||||
|
||||
if needs_container
|
||||
if container.empty?
|
||||
|
Loading…
Reference in New Issue
Block a user