'Validate and view the Compose file.
Usage: config [options]
Options:
--resolve-image-digests  Pin image tags to digests.
-q, --quiet              Only validate the configuration, don\'t print
anything.
--services               Print the service names, one per line.
--volumes                Print the volume names, one per line.'

def config(self, config_options, options):

    compose_config = get_config_from_options(self.project_dir, config_options)
    image_digests = None
    if options[u'--resolve-image-digests']:
        self.project = project_from_options(u'.', config_options)
        image_digests = image_digests_for_project(self.project)
    if options[u'--quiet']:
        return
    if options[u'--services']:
        print(u'\n'.join((service[u'name'] for service in compose_config.services)))
        return
    if options[u'--volumes']:
        print(u'\n'.join((volume for volume in compose_config.volumes)))
        return
    print(serialize_config(compose_config, image_digests))
