Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sense_containers
- Docker::Container.all(:all => true).each { |c|
- c.info['Names'].each { |name|
- if(name.start_with?('/bigsense'))
- unit = name.split('-')[1]
- if(unit)
- yield c
- end
- end
- }
- }
- end
- def list_containers
- sense_containers { |c| puts(c) }
- end
Advertisement
Add Comment
Please, Sign In to add comment