Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Docker::Image.create when
m
is nil
Sometime when pulling for second time the API responds with nil somewhere, leading to: undefined method `[]' for nil:NilClass # /var/lib/gems/2.1.0/gems/docker-api-1.13.7/lib/docker/image.rb:102:in `create' Using reverse_each + find is O(1) compared to O(n) of select + last. Also splitting it to several lines so there is no call on nil when there is no image with 'id'.
- Loading branch information