lib/kitchen/driver/docker.rb in kitchen-docker-0.9.0 vs lib/kitchen/driver/docker.rb in kitchen-docker-0.10.0
- old
+ new
@@ -28,10 +28,11 @@
default_config :username, 'kitchen'
default_config :password, 'kitchen'
default_config :require_chef_omnibus, true
default_config :remove_images, false
+ default_config :privileged, false
default_config :use_sudo, true
default_config :image do |driver|
driver.default_image
end
@@ -151,11 +152,13 @@
def build_run_command(image_id)
cmd = "run -d -p 22"
Array(config[:forward]).each {|port| cmd << " -p #{port}"}
Array(config[:dns]).each {|dns| cmd << " -dns #{dns}"}
Array(config[:volume]).each {|volume| cmd << " -v #{volume}"}
+ cmd << " -h #{config[:hostname]}" if config[:hostname]
cmd << " -m #{config[:memory]}" if config[:memory]
cmd << " -c #{config[:cpu]}" if config[:cpu]
+ cmd << " -privileged" if config[:privileged]
cmd << " #{image_id} /usr/sbin/sshd -D -o UseDNS=no -o UsePAM=no"
cmd
end
def run_container(state)