From 981e4d4b20db168891683e1f333119a48dfeb2fd Mon Sep 17 00:00:00 2001 From: Trey Dockendorf Date: Mon, 16 Jun 2014 09:57:30 -0500 Subject: [PATCH] (gh-305) Start docker containers using privileged mode --- lib/beaker/hypervisor/docker.rb | 2 +- spec/beaker/hypervisor/docker_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/beaker/hypervisor/docker.rb b/lib/beaker/hypervisor/docker.rb index 2b43f465f4..0acc202550 100644 --- a/lib/beaker/hypervisor/docker.rb +++ b/lib/beaker/hypervisor/docker.rb @@ -32,7 +32,7 @@ def provision }) @logger.debug("Starting container #{container.id}") - container.start({"PublishAllPorts" => true}) + container.start({"PublishAllPorts" => true, "Privileged" => true}) # Find out where the ssh port is from the container ip = container.json["NetworkSettings"]["Ports"]["22/tcp"][0]["HostIp"] diff --git a/spec/beaker/hypervisor/docker_spec.rb b/spec/beaker/hypervisor/docker_spec.rb index cfffe91631..6a4b4bd2d0 100644 --- a/spec/beaker/hypervisor/docker_spec.rb +++ b/spec/beaker/hypervisor/docker_spec.rb @@ -128,7 +128,7 @@ module Beaker end it 'should start the container' do - container.should_receive(:start).with({'PublishAllPorts' => true}) + container.should_receive(:start).with({'PublishAllPorts' => true, 'Privileged' => true}) docker.provision end