Commit 677d3085 authored by Mitar's avatar Mitar

Force remove to make it more robust.

parent 4da64853
......@@ -383,14 +383,15 @@ def validate_installation(primitive_names, interface_version, installation, anno
new_cli_interface = True
# Run a container which sleeps until we stop it. First we remove all existing Docker images to make the space for the new one.
print(">>> Removing exiting Docker images.")
print(">>> Removing exiting Docker images.", flush=True)
for image in docker_client.images.list():
# If we already have the image we want to run, we do not remove it.
if docker_image in image.tags:
# Otherwise we remove it.
print(">>> Removing Docker image '{docker_image}'.".format(docker_image=image.tags[0] if image.tags else, flush=True)
docker_client.images.remove(, force=True)
# Then we pull the latest version of the image.
print(">>> Pulling Docker image '{docker_image}'.".format(docker_image=docker_image), flush=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