Download vagrant box file locally from atlas and configuring it

前端 未结 8 2306
甜味超标
甜味超标 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:53

    If you have the ubuntu-VAGRANTSLASH-trusty64 folder from someone else machine you can simply copy paste the folder to

    ~/.vagrant.d/boxes
    

    and use the vagrant up to start the servers. This way you do not need to add the trusty64 box manually.

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题