Added switch `init`.

This commit is contained in:
Fabian Schlenz 2019-03-21 15:52:01 +01:00
parent ea79b9b98c
commit bf53c905e5
1 changed files with 1 additions and 0 deletions

1
dup.rb
View File

@ -28,6 +28,7 @@ MAPPINGS = [
['labels', '--label', lambda{|c,i| l=Hash[c.Config.Labels.to_h.delete_if{|k,v| i.Config.Labels[k]==v rescue false}.map{|k,v| [k.to_s, v]}] ; l}],
['hostname', '--hostname'],
['working_dir', '--workdir', lambda{|c,i| (wd=c.Config.WorkingDir) == i.Config.WorkingDir ? nil : wd}],
['init', '--init', lambda{|c,i| c.Config.Init}, {:type=>:switch}],
['image', nil, lambda{|c,i| c.Config.Image}],
['command', nil, lambda{|c,i| (cmd=c.Config.Cmd.join(" ") rescue nil) == (i.Config.Cmd.join(" ") rescue nil)? nil : cmd}, {:escape=>false}]
]