What's the best way to share files from Windows to Boot2docker VM?

前端 未结 5 1543
深忆病人
深忆病人 2020-12-02 08:51

I have make my code ready on Windows, but I find it\'s not easy to share to boot2docker.

I also find that boot2docker can\'t persistent my changes. For example, I cr

5条回答
  •  一生所求
    2020-12-02 08:56

    In the System Tray, you should have the cute Docker whale swimming. Right click and select Settings.

    Click on Apply. This will bring up the Credentials dialog and you will need to provide your current Windows credentials. Ensure that you give it correctly. I also suspect that you might need to be an administrator.

    To mount our host directory (C:\data) in a container, we are going to use the -v (volume) flag while running the container. A sample run is shown here:

    I have CentOS in my local Docker container.

    docker run -v c:/data:/data **centos** ls /data
    

提交回复
热议问题