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

前端 未结 5 1533
深忆病人
深忆病人 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:59

    See this answer.

    I have Windows 10 Home edition with Docker toolbox 1.12.2 and VirtualBox 5.1.6.

    I was able to mount a folder under C:\Users successfully in my container without doing any extra steps such as docker-machine ssh default.

    Example:

    docker run -it --rm -v /c/Users/antonyj/Documents/code:/mnt ubuntu /bin/bash
    

    So having your files under C:\Users probably is the simplest thing to do.

    If you do not want to have your files under C:\Users, then you have to follow the steps in the accepted answer.

提交回复
热议问题