I have some experience regarding vagrant setup. I have been using vagrant for almost 5-6 months but have this little doubt.
So suppose if I am creating a new box by typing
vagrant init ubuntu/xenial64
and install all the sudo apt dependencies such as nginx php or whatever.
What is the best possible way by which I can export this to my other machine so I dont have to install all those dependencies and I can simply do
vagrant init ubuntu/xenial64
and all my dependencies are automatically installed.
Thanks.
It looks you’re trying to mention another user, which only works if it’s done in the comments like this (otherwise they don’t receive a notification):
– ubuntu/xenial64
—
^I’m ^a ^bot. ^Bleep. ^Bloop. ^| ^Visit ^/r/mentionhelper ^for ^discussion/feedback ^| ^Want ^to ^be ^left ^alone? ^Reply ^to ^this ^message ^with ^”stop”
write a provision script that does all the things you want to happen in the vagrant vm and include it in the Vagrantfile. From the [vagrant documentation](https://www.vagrantup.com/docs/provisioning/shell.html):
$script = <
Use Packer to build your base box with everything already installed and pre-packed. Then all you have to do is `vagrant up` and your machine is ready to go. This requires a little more work but I think it’s worth it in the long run.
https://www.packer.io/docs/builders