Search in sources :

Example 1 with Image

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

the class ImagesCommand method execute.

@Override
public Object execute() throws Exception {
    ShellTable table = new ShellTable();
    table.column("Id");
    table.column("RepoTags");
    table.column("Created");
    table.column("Labels");
    table.column("Size");
    table.column("Virtual Size");
    for (Image image : getDockerService().images(url)) {
        table.addRow().addContent(image.getId(), image.getRepoTags(), image.getCreated(), image.getLabels(), image.getSize(), image.getVirtualSize());
    }
    table.print(System.out);
    return null;
}
Also used : ShellTable(org.apache.karaf.shell.support.table.ShellTable) Image(org.apache.karaf.docker.Image)

Aggregations

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