아틀라스에서 로컬로 방랑 상자 파일을 다운로드하고 구성
나중에 내 방랑 파일과 함께 로컬에서 사용하기 위해 Atlas에서 방랑 상자 파일을 다운로드하고 싶습니다. 이 작업을 어떻게 수행하고 구성 할 수 있습니까?
파일을 다운로드하려면 URL에 버전과 공급자를 추가해야합니다. 예를 들어 trusty64를 다운로드하려면 먼저 https://app.vagrantup.com/ubuntu/boxes/trusty64/ URL이 필요합니다.
그런 다음 나중에 버전과 공급자를 추가해야합니다 (예 : 다운로드 URL).
https://app.vagrantup.com/ubuntu/boxes/trusty64/versions/20180206.0.0/providers/virtualbox.box
그런 다음 방랑 파일에서 로컬로 추가해야합니다.
vagrant 파일에 로컬로 추가하려면 다음 명령을 사용하십시오.
vagrant box add foo-box /path/to/vagrant-box.box
vagrant init foo-box
vagrant up
이것은 vagrantfile을 생성하고 vagrant 파일을 구성 할 수 있습니다.
그러나 이렇게하면 상자가 버전 0으로 추가됩니다.
○ → vagrant box add ubuntu/trusty64 ~/Downloads/trusty-server-cloudimg-amd64-vagrant-disk1.box
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'ubuntu/trusty64' (v0) for provider:
box: Unpacking necessary files from: file:///Users/ram/Downloads/trusty-server-cloudimg-amd64-vagrant-disk1.box
==> box: Successfully added box 'ubuntu/trusty64' (v0) for 'virtualbox'!
vagrant는 수동으로 추가 된 상자의 버전 번호를 지정할 수 없습니다.
○ → vagrant box add ubuntu/trusty64 ~/Downloads/trusty-server-cloudimg-amd64-vagrant-disk1.box --box-version 20151021.0.0
==> box: Box file was not detected as metadata. Adding it directly...
You specified a box version constraint with a direct box file
path. Box version constraints only work with boxes from Vagrant
Cloud or a custom box host. Please remove the version constraint
and try again.
상자의 버전 번호를 업데이트하려면 ~ / .vagrant.d / boxes / ubuntu-VAGRANTSLASH-trusty64 / 0의 폴더 이름 '0'을 다운로드 한 버전 번호로 변경하십시오. 예 : '20160120.0.0'
|2.2.3| MacBook-Pro in ~/.vagrant.d/boxes/ubuntu-VAGRANTSLASH-trusty64
○ → mv 0 20160120.0.0
이제 vagrant 명령으로 다음에 버전을 업데이트하도록 모두 설정되었습니다.
○ → vagrant box list
ubuntu/trusty64 (virtualbox, 20160120.0.0)
스크립트에서 다운로드 할 수없는 동일한 문제에 직면했습니다. 그래서 수동으로 상자를 다운로드하고 아래와 같이 방랑자에 추가했습니다.
여기에서 원하는 버전을 얻을 수 있습니다-https: //atlas.hashicorp.com/ubuntu/boxes/precise64
wget https://atlas.hashicorp.com/ubuntu/boxes/precise64/versions/20160818.0.0/providers/virtualbox.box
cd my_vagrant_project
vagrant box add precise64 ~/Downloads/precise-server-cloudimg-amd64-vagrant-disk1.box
vagrant init precise64
vagrant up
먼저 다음 링크에서 최신 버전을 확인 여기
업데이트 : 당신의 버전 변경하려고 다음, 최신 버전의 수를 얻기 위해, 위의 언급 한 링크로 이동하여 시도 할 수 있습니다 울부 짖는 URL
이제 최신 버전은 다음과 같습니다 7.2.1
에 대한 virtualbox :
https://vagrantcloud.com/laravel/boxes/homestead/versions/7.2.1/providers/virtualbox.box
for hyperv :
https://vagrantcloud.com/laravel/boxes/homestead/versions/7.2.1/
vmware 용 provider / hyperv.box :
https://vagrantcloud.com/laravel/boxes/homestead/versions/7.2.1/providers/vmware_desktop.box
병렬 용 :
https://vagrantcloud.com/laravel/boxes/homestead/ versions / 7.2.1 / providers / parallels.box
아마도 in the future the link changed so try to get download vagrant box by using command on your terminal/CMD by command
vagrant box add laravel/homestead
choose your virtualization method
then you will see the download link ended with *.box, after that you can cancel it CTRL+C and copy the download link and download it locally by using IDM/aria2c -x16 etc.
Second: Use this command
vagrant box add laravel/homestead {Path of file from your local computer}
third:add metadata by go to
1- you create a file called metadata_url NOTE: There is no extension for metadata_url
2- Then add this link and save the file
https://atlas.hashicorp.com/laravel/homestead
3- Copy metadata_url file to:
for windows go to
%userprofile%\.vagrant.d\boxes\laravel-VAGRANTSLASH-homestead
4- Then rename the folder named 0 to the version of the homestead for now 7.2.1
I hope this help for more information
Laravel
metadata
Download virtualbox.box:
https://app.vagrantup.com/laravel/boxes/homestead/versions/6.4.0/providers/virtualbox.box
You can change the version(6.4.0) of homestead box with the Current Version.
Current version: 6.4.0.
Check for the latest version here: https://app.vagrantup.com/laravel/boxes/homestead
After downloading the box, rename it to virtualbox.box
Don't forget to include the .box extension.
Add the downloaded homestead box to vagrant:
vagrant box add laravel/homestead file:///f:/virtualbox.box
Change the Drive( c: or d: or e:
) or Path(c:/folder1/folder2/virtualbox.box
) to the location where you have stored your downloaded homestead box.
You will get success massage like image below:
Update homestead box
Navigate to vagrant directory:
c:/users/YourUserName/.vagrant.d/boxes/laravel-VAGRANTSLASH-homestead
After that, Create a file called metadata_url
NOTE: There is no extension for metadata_url
Then add the link below and save the file
https://app.vagrantup.com/laravel/homestead
Do not add a newline after link in above file.
Rename folder 0 to 6.4.0
6.4.0 is your homestead box version.
And it's Done. Hope it help.
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.
Instructions for OSX/Fusion:
wget https://vagrantcloud.com/hashicorp/boxes/precise64/versions/1.1.0/providers/vmware_fusion.box
# For some reason, the downloaded filename was set to an uuid
# mv <uuid> vmware_fusion.box
vagrant box add hashicorp/precise64 vmware_fusion.box
cd vagrant.d/boxes/hashicorp-VAGRANTSLASH-precise64
mv 0 1.1.0
echo -n "https://app.vagrantup.com/hashicorp/boxes/precise64" > metadata_url
vagrant box list
I try to use vagrant up
and I got URL to download box file:
https://vagrantcloud.com/centos/boxes/7/versions/1801.02/providers/virtualbox.box
ReferenceURL : https://stackoverflow.com/questions/28399324/download-vagrant-box-file-locally-from-atlas-and-configuring-it
'Nice programing' 카테고리의 다른 글
Interface Builder의 UILabel에 유니 코드 문자를 입력하는 방법은 무엇입니까? (0) | 2021.01.09 |
---|---|
pip를 사용하여 우분투 12.04에 pymssql을 설치하려고 (0) | 2021.01.09 |
corecrt.h를 찾을 수 없음 : $ (UniversalCRT_IncludePath)가 잘못되었습니다. (0) | 2021.01.09 |
c # : 문자열 상수를 저장하기 위해 열거 형을 사용하는 방법? (0) | 2021.01.09 |
메서드 숨기기와 재정의 (0) | 2021.01.09 |