Skip to content

updating check for container_info networkings port #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 19, 2017

Conversation

nandeshguru
Copy link
Contributor

PR for issue #37 load_with_context': undefined method `each' for nil:NilClass (NoMethodError) exception in cis-docker-benchmark-master/controls/container_runtime.rb:194

@atomic111
Copy link
Member

@coolguru Thank you for your PR. i think it should be like if !container_info... because i test there if the object empty. May be i am wrong?

@atomic111
Copy link
Member

atomic111 commented Sep 19, 2017

@coolguru Sorry, to early for me today. you are right.

inspec> docker.object('40c6ad921df7428069626637cc2d43b8d2d9404aa440e00fd0eb37d11406e14c')['NetworkSettings']['Ports']
=> {}
inspec> docker.object('40c6ad921df7428069626637cc2d43b8d2d9404aa440e00fd0eb37d11406e14c')['NetworkSettings']['Ports'].nil?
=> false

Copy link
Member

@atomic111 atomic111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coolguru thanks for the BugFix. great!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants