如何更改 vagrant 中的默认框
我想在 Mac M1 中使用命令 vagrant up --provider=docker
来运行 vagrant up,provider is docker。
输出是
Bringing machine 'default' up with 'docker' provider...
==> default: Box 'debian/bullseye64' could not be found. Attempting to find and install...
default: Box Provider: docker
default: Box Version: >= 0
==> default: Loading metadata for box 'debian/bullseye64'
default: URL: https://vagrantcloud.com/debian/bullseye64
The box you're attempting to add doesn't support the provider
you requested. Please find an alternate box or use an alternate
provider. Double-check your requested provider to verify you didn't
simply misspell it.
If you're adding a box from HashiCorp's Vagrant Cloud, make sure the box is
released.
Name: debian/bullseye64
Address: https://vagrantcloud.com/debian/bullseye64
Requested provider: [:docker]
Image debian/bullseye64 is not found,所以我想将框更改为 debian/bullseye。我该怎么办?谢谢大家!
I want to run vagrant up with provider is docker with command vagrant up --provider=docker
in Mac M1.
The output is
Bringing machine 'default' up with 'docker' provider...
==> default: Box 'debian/bullseye64' could not be found. Attempting to find and install...
default: Box Provider: docker
default: Box Version: >= 0
==> default: Loading metadata for box 'debian/bullseye64'
default: URL: https://vagrantcloud.com/debian/bullseye64
The box you're attempting to add doesn't support the provider
you requested. Please find an alternate box or use an alternate
provider. Double-check your requested provider to verify you didn't
simply misspell it.
If you're adding a box from HashiCorp's Vagrant Cloud, make sure the box is
released.
Name: debian/bullseye64
Address: https://vagrantcloud.com/debian/bullseye64
Requested provider: [:docker]
Image debian/bullseye64 is not found, so I want to change the box to debian/bullseye. How can I do? Thank all!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的问题中有几件事:
如果您打开 Vagrantfile,您会看到类似的内容,
这是您需要更改并替换为新框名称的地方。
没有
debian/bullseye
盒子,因此除非您自己在笔记本电脑上创建了这个盒子,否则您将无法使用它你想使用 docker,所以你需要一个运行的盒子在 docker 提供程序上,您可以在 vagrant cloud 中搜索这样的框,例如 https://app.vagrantup.com/boxes/search?provider=docker
There are couple of things in your question:
If you open your Vagrantfile, you'll see you have something like
That is the place you need to change and replace by your new box name.
There's no
debian/bullseye
box, so unless you have created this one yourself sitting on your laptop, you will not be able to use itYou want to use docker so you need a box that runs on docker provider, you can search for such box in vagrant cloud like https://app.vagrantup.com/boxes/search?provider=docker