lib/vocker/docker_client.rb in vocker-0.3.1 vs lib/vocker/docker_client.rb in vocker-0.3.2
- old
+ new
@@ -13,10 +13,16 @@
comm.sudo("docker images | grep -q #{image} || docker pull #{image}")
end
end
end
+ def start_service
+ if !daemon_running? && @machine.guest.capability?(:docker_start_service)
+ @machine.guest.capability(:docker_start_service)
+ end
+ end
+
def daemon_running?
@machine.communicate.test('test -f /var/run/docker.pid')
end
def run(containers)
@@ -56,9 +62,10 @@
end
def create_container(config)
args = "-cidfile=#{config[:cidfile]} -d"
args << " -dns=#{config[:dns]}" if config[:dns]
+ args << " #{config[:additional_run_args]}" if config[:additional_run_args]
@machine.communicate.sudo %[
rm -f #{config[:cidfile]}
docker run #{args} #{config[:image]} #{config[:cmd]}
]
end