Esempio n. 1
0
def get_project(path):
    """
    get docker project given file path
    """
    logging.debug('get project ' + path)
    command = Command()
    config_path = get_yml_path(path)
    project = command.get_project(config_path)
    return project
Esempio n. 2
0
def get_service_host(service_name):
    client = docker.Client()
    project = Command().get_project_name('replicationhandler')
    container = client.inspect_container("%s_%s_1" % (project, service_name))
    return container['NetworkSettings']['IPAddress']