private void validateVersion(Map<String, Object> compose, File file) {
        Object version = compose.get("version");
        if (version == null || !isVersion2(version.toString().trim())) {
            throw new ExternalConfigHandlerException("Only version 2.x of the docker-compose format is supported for " + file);
        }
    }
Docker Compose handler for allowing a docker-compose file to be used
to specify the docker images.
src/main/java/io/fabric8/maven/docker/config/handler/compose/DockerComposeConfigHandler.java