gpt4 book ai didi

vagrant - "vagrant box update"自动位于 "vagrant up"之前

转载 作者:行者123 更新时间:2023-12-02 10:10:57 25 4
gpt4 key购买 nike

是否可以配置 Vagrantfile,以便在通过 vagrant up 启动盒子时自动运行 vagrant box update

最佳答案

不,这是不可能的,正如您在 Vagrant 文档中看到的那样:

Using the Vagrantfile, you can also configure Vagrant to automatically check for updates during any vagrant up. This is enabled by default, but can easily be disabled with config.vm.box_check_update = false in your Vagrantfile.

When this is enabled, Vagrant will check for updates on every vagrant up, not just when the machine is being created from scratch, but also when it is resuming, starting after being halted, etc.

If an update is found, Vagrant will output a warning to the user letting them know an update is available. That user can choose to ignore the warning for now, or can update the box by running vagrant box update.

Vagrant can not and does not automatically download the updated box and update the machine because boxes can be relatively large and updating the machine requires destroying it and recreating it, which can cause important data to be lost. Therefore, this process is manual to the extent that the user has to manually enter a command to do it.

您可以在 link 中查看更多文档

关于vagrant - "vagrant box update"自动位于 "vagrant up"之前,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37284935/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com