Add only-containers option to scan subcommand #122

This commit is contained in:
Kota Kanbe
2016-09-20 21:11:57 +09:00
parent cb445c9504
commit 2dffdaac42
5 changed files with 39 additions and 11 deletions

View File

@@ -176,8 +176,13 @@ func InitServers(localLogger *logrus.Entry) error {
if len(servers) == 0 {
return fmt.Errorf("No scannable servers")
}
containers := detectContainerOSes()
servers = append(servers, containers...)
if config.Conf.ContainersOnly {
servers = containers
} else {
servers = append(servers, containers...)
}
return nil
}