Skip to content

Commit 09bcd6e

Browse files
committed
Merge pull request #94 from i11/master
Fix deprecated -dns argument. Add host support
2 parents a714406 + 8c75188 commit 09bcd6e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/kitchen/driver/docker.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ def parse_container_id(output)
217217
def build_run_command(image_id)
218218
cmd = "run -d -p 22"
219219
Array(config[:forward]).each {|port| cmd << " -p #{port}"}
220-
Array(config[:dns]).each {|dns| cmd << " -dns #{dns}"}
220+
Array(config[:dns]).each {|dns| cmd << " --dns #{dns}"}
221+
Array(config[:add_host]).each {|host, ip| cmd << " --add-host=#{host}:#{ip}"}
221222
Array(config[:volume]).each {|volume| cmd << " -v #{volume}"}
222223
Array(config[:volumes_from]).each {|container| cmd << " --volumes-from #{container}"}
223224
Array(config[:links]).each {|link| cmd << " --link #{link}"}

0 commit comments

Comments
 (0)