private boolean containerMatchesPattern(Container container, Matcher imageNameMatcher, Matcher containerNameMatcher,
            String patternConfigName) {
        if (imageNameMatcher != null && container.getImage() != null && imageNameMatcher.reset(container.getImage())
                .find()) {
            log.debug("Container image %s matched %s", container.getImage(), patternConfigName);
            return true;
        } else if (containerNameMatcher != null && container.getName() != null && containerNameMatcher
                .reset(container.getName()).find()) {
            log.debug("Container name %s matched %s", container.getName(), patternConfigName);
            return true;
        } else {
            log.debug("Neither container image %s nor name %s matched %s", container.getImage(), container.getName(),
                    patternConfigName);
            return false;
        }
    }
Get all volumes which are defined separately from the images

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