Skip all docker images not tagged (otherwise, the method crashes)

This commit is contained in:
Sebastian Serth
2018-11-22 19:03:35 +01:00
parent 0fbbe97ae4
commit 39a822f8bf

View File

@ -333,7 +333,14 @@ class DockerClient
def self.find_image_by_tag(tag)
# todo: cache this.
Docker::Image.all.detect { |image| image.info['RepoTags'].flatten.include?(tag) }
Docker::Image.all.detect do |image|
begin
image.info['RepoTags'].flatten.include?(tag)
rescue
# Skip image if it is not tagged
next
end
end
end
def self.generate_local_workspace_path