Commit ce2eadb1 authored by José Henrique's avatar José Henrique
Browse files

Revert "Always throw container exceptions"

This reverts commit ef958a5e.
parent dd754e54
......@@ -2,6 +2,7 @@
import docker
import os
import traceback
import threading
import time
......@@ -72,11 +73,17 @@ def start_build(environment_vars):
kill_container(container_name)
pull_image(image_name)
print("Starting container: " + container_name)
stream_container_logs(container_name)
time.sleep(1)
docker_client.containers.run(image_name,
remove=True,
name=container_name,
volumes=volumes_to_mount,
environment=environment_vars)
return True
try:
stream_container_logs(container_name)
time.sleep(1)
docker_client.containers.run(image_name,
remove=True,
name=container_name,
volumes=volumes_to_mount,
environment=environment_vars)
return True
except docker.errors.ContainerError:
return False
except Exception:
traceback.print_exc()
return False
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment