protected List<Container> getContainersForPattern(QueryService queryService, boolean all, Matcher imageNameMatcher,
            Matcher containerNameMatcher, String patternConfigName) throws IOException {
        return queryService.listContainers(all).stream()
                .filter(c -> containerMatchesPattern(c, imageNameMatcher, containerNameMatcher, patternConfigName))
                .collect(Collectors.toList());
    }
Get all volumes which are defined separately from the images

@return defined volumes
src/main/java/io/fabric8/maven/docker/AbstractDockerMojo.java