Search in sources :

Example 1 with IDockerContainerChange

use of org.eclipse.linuxtools.docker.core.IDockerContainerChange in project linuxtools by eclipse.

the class DockerConnection method containerChanges.

@Override
public List<IDockerContainerChange> containerChanges(final String id) throws DockerException, InterruptedException {
    List<IDockerContainerChange> containerChanges = new ArrayList<>();
    try {
        DockerClient copy = getClientCopy();
        List<ContainerChange> changes = copy.inspectContainerChanges(id);
        for (ContainerChange change : changes) {
            containerChanges.add(new DockerContainerChange(change.path(), change.kind()));
        }
    } catch (com.spotify.docker.client.exceptions.DockerException e) {
        throw new DockerException(e.getMessage(), e.getCause());
    }
    return containerChanges;
}
Also used : DockerException(org.eclipse.linuxtools.docker.core.DockerException) DockerClient(com.spotify.docker.client.DockerClient) IDockerContainerChange(org.eclipse.linuxtools.docker.core.IDockerContainerChange) ArrayList(java.util.ArrayList) ContainerChange(com.spotify.docker.client.messages.ContainerChange) IDockerContainerChange(org.eclipse.linuxtools.docker.core.IDockerContainerChange) IDockerContainerChange(org.eclipse.linuxtools.docker.core.IDockerContainerChange)

Aggregations

DockerClient (com.spotify.docker.client.DockerClient)1 ContainerChange (com.spotify.docker.client.messages.ContainerChange)1 ArrayList (java.util.ArrayList)1 DockerException (org.eclipse.linuxtools.docker.core.DockerException)1 IDockerContainerChange (org.eclipse.linuxtools.docker.core.IDockerContainerChange)1