使用 vagrant base box 打包同步文件夹 [英] packaging synced folder with vagrant base box

查看:30
本文介绍了使用 vagrant base box 打包同步文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在打包 vagrant box 时,package.box 文件不包含同步文件夹/src,其中包含我在配置期间下载的一堆存储库.包含同步文件夹以便我可以分发虚拟机的最佳方法是什么?

when packaging a vagrant box, the package.box file does not contain a synced folder /src that has a bunch of repos I downloaded to it during provisioning. What would be the best way to include the synced folder so I can distribute the vm?

推荐答案

我猜您正在主机和虚拟机之间使用共享文件夹.Vagrant 包永远不会打包你的共享文件夹,因为它们不是虚拟机的一部分,它们属于你的主机.

I guess you are using shared folders between your host and your virtual machine. Vagrant package will never package your shared folders because they are not part of the virtual machine, they belongs to your host.

打包这些文件的最佳方法是将它们存储在虚拟机的另一个文件夹中,例如您的/home 或/opt.

The best way to package these files, is to store them in another folder in the virtual machine like in your /home or /opt for example.

这篇关于使用 vagrant base box 打包同步文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆