Download vagrant box file locally from atlas and configuring it

前端 未结 8 2304
甜味超标
甜味超标 2020-12-12 09:19

I want to download a vagrant box file from Atlas for using it later locally with my vagrant file. How can I do this, and how can I configure it?

8条回答
  •  醉梦人生
    2020-12-12 09:58

    To download a file you have to add version and provider in the URL. For example for downloading trusty64 First you need its URL which is https://app.vagrantup.com/ubuntu/boxes/trusty64/

    then you have to add version and provider afterwards, for our example the download URL would be.

    https://app.vagrantup.com/ubuntu/boxes/trusty64/versions/20180206.0.0/providers/virtualbox.box

    Then you have to add it locally from your vagrant file.

    To add it locally to vagrant file use the following command

    vagrant box add foo-box /path/to/vagrant-box.box
    vagrant init foo-box
    vagrant up
    

    This will create the vagrantfile and you can configure the vagrant file.

提交回复
热议问题