コンテナ内で複数の
サービスを管理する試みと何か...
docker_ver = Docker.version
send_event('docker', { text: hostname } )
send_event('docker', { moreinfo: docker_ver["Version"] } )
cons_run = Docker::Container.all(:running => true)
run_docker_list = Hash.new({ value: 0 })
cons_run.each do |con|
docker_id = con.id[0,12]
docker_image = con.info.fetch("Image")
run_docker_list[docker_id] = { label: docker_id, value: docker_image }
send_event('containers', { items: run_docker_list.values })
end
end
cons_run = Docker::Container.all(:running => true)
send_event('count', { current: cons_run.size } )
docker_info = Docker.info
send_event('allcontainers', { current: docker_info["Containers"] } )