create.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:TigerHost 作者: naphatkrit 项目源码 文件源码
def _update_docker_machine_ip(machine_name, new_ip):
    path = path_utils.docker_machine_path(machine_name)
    config_path = os.path.join(path, 'config.json')
    with open(config_path, 'r') as f:
        data = json.load(f)
    data['Driver']['IPAddress'] = new_ip
    with open(config_path, 'w') as f:
        json.dump(data, f)
    docker_machine.check_call(
        ['regenerate-certs', '--force', machine_name])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号