Search in sources :

Example 1 with ImageSearch

use of org.apache.karaf.docker.ImageSearch in project karaf by apache.

the class SearchCommand method execute.

@Override
public Object execute() throws Exception {
    ShellTable table = new ShellTable();
    table.column("Name");
    table.column("Description");
    table.column("Automated");
    table.column("Official");
    table.column("Star Count");
    for (ImageSearch search : getDockerService().search(term, url)) {
        table.addRow().addContent(search.getName(), search.getDescription(), search.isAutomated(), search.isOfficial(), search.getStarCount());
    }
    table.print(System.out);
    return null;
}
Also used : ShellTable(org.apache.karaf.shell.support.table.ShellTable) ImageSearch(org.apache.karaf.docker.ImageSearch)

Aggregations

ImageSearch (org.apache.karaf.docker.ImageSearch)1 ShellTable (org.apache.karaf.shell.support.table.ShellTable)1