Easiest way to copy a single file from host to Vagrant guest?

前端 未结 19 1771
暖寄归人
暖寄归人 2020-12-22 15:15

I have a use case where I occasionally want to copy a single file from my host machine to the Vagrant guest.

I don\'t want to do so via traditional provisioners (Pup

19条回答
  •  悲哀的现实
    2020-12-22 15:17

    There is actually a much simpler solution. See https://gist.github.com/colindean/5213685/#comment-882885:

    "please note that unless you specifically want scp for some reason, the easiest way to transfer files from the host to the VM is to just put them in the same directory as the Vagrantfile - that directory is automatically mounted under /vagrant in the VM so you can copy or use them directly from the VM."

提交回复
热议问题