2013-11-21 60 views
0
[email protected]:~/work/source$ ls 
package.box pretty-simple-redismonitor sonar Vagrantfile VirtualBox-4.3.2 
[email protected]:~/work/source$ vagrant package --vagrantfile sonar 
/home/gem/work/source/Vagrantfile:5: warning: already initialized constant 
VAGRANTFILE_API_VERSION 
[default] Clearing any previously set forwarded ports... 
[default] Creating temporary directory for export... 
[default] Exporting VM... 
[default] Compressing package to: /home/gem/work/source/package.box 
[default] Packaging additional file: sonar 
[email protected]:~/work/source$ vagrant package --vagrantfile pretty-simple-redismonitor 
/home/gem/work/source/Vagrantfile:5: warning: already initialized constant 
VAGRANTFILE_API_VERSION 
[default] Clearing any previously set forwarded ports... 
[default] Creating temporary directory for export... 
[default] Exporting VM... 
The specified file to save the package as already exists. 
Please remove this file or specify a different file name for outputting. 

我無法在包中添加其他項目。其實我是新來的流浪者,請讓我知道如何添加和與我的團隊成員分享這些軟件包。無法添加流浪包

+0

@ krs- Singam Singam – Sam

回答

0

如果要將其他文件添加到打包框中,應使用--include選項。

下面是完整的使用橫幅:

Usage: vagrant package [vm-name] [--base name] [--output name.box] 
         [--include one,two,three] [--vagrantfile file] 

     --base NAME    Name of a VM in virtualbox to package as a base box 
     --output NAME    Name of the file to output 
     --include x,y,z   Additional files to package with the box. 
     --vagrantfile file  Vagrantfile to package with the box. 
     -h, --help    Print this help 
+0

請讓我知道像模板或如:因爲我是新來的流浪漢,如果可能的話讓我知道如何分享給我的團隊成員也是如此。提前致謝 – krs