Hands-On DevOps with Vagrant
上QQ阅读APP看书,第一时间看更新

sub-commands

There are seven sub-commands available for the box command:

  • vagrant box add [INSERT VALUE]: Adds and downloads a Vagrant box to your system. This box can then be used in your Vagrantfile to create a Vagrant machine.
  • vagrant box list: Lists all installed boxes installed on your system.
  • vagrant box outdated: Checks whether the current Vagrant box is outdated. You can add the --global flag, which will check all installed Vagrant boxes.
  • vagrant box prune: Removes old versions of installed boxes. It will ask for confirmation if you are currently using an old version of a box it wants to delete.
  • vagrant box remove [INSERT VALUE]: Removes a Vagrant box by name as the first parameter supplied.
  • vagrant box repackage [INSERT VALUE] [INSERT VALUE] [INSERT VALUE]: Repackages a Vagrant box into a .box file using the name as the first parameter, the provider as the second parameter, and the version as the third parameter. You can get the parameter values using the vagrant box list command. The box can then be distributed.
  • vagrant box update: Checks and updates the current box you are using. You can supply the --box [INSERT VALUE] flag where the first parameter is the box name that you wish to specifically update.