Search in sources :

Example 1 with ImageHistory

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

the class HistoryCommand method execute.

@Override
public Object execute() throws Exception {
    List<ImageHistory> histories = getDockerService().history(image, url);
    ShellTable table = new ShellTable();
    table.column("ID");
    table.column("Created");
    table.column("Created By");
    table.column("Tags");
    table.column("Size");
    for (ImageHistory history : histories) {
        table.addRow().addContent(history.getId(), history.getCreated(), history.getCreatedBy(), history.getComment(), history.getTags(), history.getSize());
    }
    table.print(System.out);
    return null;
}
Also used : ShellTable(org.apache.karaf.shell.support.table.ShellTable) ImageHistory(org.apache.karaf.docker.ImageHistory)

Aggregations

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