Docker mounting volume for editing source code

后端 未结 1 342
醉酒成梦
醉酒成梦 2021-01-07 09:37

I have docker setup on my Windows system. The source code of the application is available at C:\\Application\\source location. I want this information to be ava

1条回答
  •  伪装坚强ぢ
    2021-01-07 10:26

    In the Oracle Virtual box, I've shared the folder C:\Application

    That is not enough. You need to modify your boot2docker image in order for the TinyCore Linux session to mount the shared path (only C:\Users\ is mounted by default as /c/Users/)

    See "Docker Compose Mount Window Folder"

    Edit/create (as root) /mnt/sda1/var/lib/boot2docker/bootlocal.sh, (sda1 may be different for you)

    Add:

    mkdir -p 
    mount -t vboxsf -o defaults,uid=`id -u docker`,gid=`id -g docker`  
    

    (the mount might need umask option as well)

    0 讨论(0)
提交回复
热议问题