Merge pull request #177 from openHPI/parse-errors-on-stop

Parse runtime output on stop
This commit is contained in:
rteusner
2018-06-14 13:14:34 +02:00
committed by GitHub

View File

@ -186,11 +186,12 @@ class DockerClient
end
def self.destroy_container(container)
@socket.close
Rails.logger.info('destroying container ' + container.to_s)
container.stop.kill
container.port_bindings.values.each { |port| PortPool.release(port) }
clean_container_workspace(container)
if(container)
if container
container.delete(force: true, v: true)
end
rescue Docker::Error::NotFoundError => error