How to mount a host directory in a Docker container

后端 未结 25 1297
庸人自扰
庸人自扰 2020-11-22 12:43

I am trying to mount a host directory into a Docker container so that any updates done on the host is reflected into the Docker containers.

Where am I doing somethin

相关标签:
25条回答
  • 2020-11-22 13:25

    To get this working in Windows 10 I had to open the Docker Settings window from the system tray and go to the Shared Drives section.

    I then checked the box next to C. Docker asked for my desktop credentials to gain authorisation to write to my Users folder.

    Then I ran the docker container following examples above and also the example on that settings page, attaching to /data in the container.

    docker run -v c:/Users/<user.name>/Desktop/dockerStorage:/data -other -options
    
    0 讨论(0)
提交回复
热议问题