Docker mounting volume for editing source code

后端 未结 1 344
醉酒成梦
醉酒成梦 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\<yourlogin> is mounted by default as /c/Users/<yourLogin>)

    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 <local_dir>
    mount -t vboxsf -o defaults,uid=`id -u docker`,gid=`id -g docker` <mount_name> <local_dir>
    

    (the mount might need umask option as well)

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