Hi there –
I'm creating a Vagrantfile for a VM running Ubuntu. This Vagrantfile runs a bootstrap.sh script, which installs various packages via apt-get. I keep both of these files in a Git repository, for easy sharing with other developers.
Here's my challenge: in addition to installing the apt packages, I'd like my bootstrap.sh to copy a few files onto the VM. (For example, I have a custom makevhost.sh script which needs to be available on the VM.)
What's the best way to do this, without putting the contents of makevhost.sh inline in bootstrap.sh (in a cat command or similar)?
My Vagrantfile also defines a synced folder, so I could put makevhost.sh in that directory, so that it'll be accessible to guest machine (and therefore accessible to bootstrap.sh) – but I'd prefer to avoid that.
Is there an established practice for accomplishing this? I'm sure it's a common goal.
Thanks!