原文地址html
建立 Vagrant 的 box 时,能够提供在运行 vagrant box list -i
时展现的与用户相关的其余信息。例如,能够打包 box,以包含有关该 box 的做者和网站信息:web
brian@localghost % vagrant box list -i
hashicorp/precise64 (virtualbox, 1.0.0)
- author: brian - homepage: https://www.vagrantup.com
为了实现这个目标,只须要在建立一个基本 box 时包含一个名为 info.json
的 JSON 文档,其中包含全部相关信息,当 -i
选项与 vagrant box 列表一块儿使用时,将显示给用户。json
{
"author": "brian",
"homepage": "https://example.com" }
info.json
中没有特殊的键或值,Vagrant 会在每行上打印每一个键和值。ruby
Box File Format 提供了关于打包进 Vagrant box 的内容的更多信息。svg