Shared Volume in Docker through Vagrant

前端 未结 3 1409
独厮守ぢ
独厮守ぢ 2021-02-06 02:13

I have a Vagrant virtualbox which hosts a Docker container. The host machine has a folder which needs to be accessible in the vm and the container:

Host: /host/p         


        
3条回答
  •  孤街浪徒
    2021-02-06 02:45

    Not sure about the why of your problem. I'm not sure how the VM persist state of running programs during reboots, so I'd say the safe thing to do is to reload the container anyway when you vagrant up.

    You can automate the reloading of the container using vagrant provisioning (in your Vagrantfile):

    config.vm.provision :shell, :inline => <<

提交回复
热议问题