| |
@@ -67,12 +67,20 @@
|
| |
|
| |
sys.stderr.write("Launching Docker container for {0}\n".format(image))
|
| |
|
| |
+ # Make sure the docker service is running
|
| |
+ cmd = [
|
| |
+ "/usr/sbin/service", "docker", "start"
|
| |
+ ]
|
| |
+ try:
|
| |
+ subprocess.check_call(cmd, stdout=sys.stderr.fileno())
|
| |
+ except subprocess.CalledProcessError, ex:
|
| |
+ raise RuntimeError("Could not start docker service")
|
| |
+
|
| |
# And launch the actual container
|
| |
cmd = [
|
| |
"/usr/bin/docker", "run", "--detach", "--cidfile={0}".format(cidfile),
|
| |
"--entrypoint=/bin/sh", image, "-c", "sleep 1000000"
|
| |
]
|
| |
-
|
| |
try:
|
| |
subprocess.check_call(cmd, stdout=sys.stderr.fileno())
|
| |
except subprocess.CalledProcessError, ex:
|
| |