protected Matcher getContainerNameMatcher(String pattern, String configName) throws MojoExecutionException {
        try {
            String nameRegex = NamePatternUtil.convertNamePatternList(pattern, NamePatternUtil.NAME_FIELD, true);
            if (nameRegex == null) {
                log.debug("No container name patterns in %s %s", configName, pattern);
                return null;
            }
            log.debug("Converted %s %s into container name regular expression %s", configName, pattern, nameRegex);
            return Pattern.compile(nameRegex).matcher("");
        } catch (IllegalArgumentException e) {
            throw new MojoExecutionException(e.getMessage(), e);
        }
    }
Get all volumes which are defined separately from the images

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