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

Always throw container exceptions

parent 9651a0df
......@@ -2,7 +2,6 @@
import docker
import os
import traceback
import threading
import time
......@@ -73,16 +72,10 @@ def start_build(environment_vars):
kill_container(container_name)
pull_image(image_name)
print("Starting container: " + container_name)
try:
stream_container_logs(container_name)
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
stream_container_logs(container_name)
docker_client.containers.run(image_name,
remove=True,
name=container_name,
volumes=volumes_to_mount,
environment=environment_vars)
return True
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