spinalcordtoolbox / sct_docker

Docker distribution of Spinal Cord Toolbox
3 stars 3 forks source link

Windows shared folders not working (Toolbox) #13

Closed zougloub closed 5 years ago

zougloub commented 6 years ago

The docker shared folder doesn't seem to actually be sharing files between systems.

Follow-up of #12.

zougloub commented 6 years ago

Reproduced the problem on my end following the installation instructions:

CRMBMuser commented 6 years ago

Hello everybody,

Is this issue still opened?

I recently tried to pull the SCT v3.2.2 on Docker Quickstart Terminal. I followed all installation steps and the following command is working:

‘docker run -p 2222:22 --rm -it -v //c/Users/docker_shared_folder://home/sct/docker_shared_folder neuropoly/sct:sct-3.2.2-official’

On windows host, I’ve shared C:/Users/docker_shared_folder in the VM configuration tab (docker_shared_folder is the name). Still, I can’t share any data between Windows and Linux (and vice versa) and I can’t launch Xming. I feel like it is indeed a permission issue yet I haven’t been able to fix it. I’ve tried the mount command on Linux VM but without success so far.

Does anybody have any insights of what I should do? Thank you very much for your help!

Best,

zougloub commented 6 years ago

Hi @CRMBMuser,

Actually the issue is fixed on Docker for Windows (ie. not Home), but I don't have anything to test in the Docker Toolbox environment. Just to be sure, are you really running the Windows Home version?

PS: for those who may have had the issue on Windows "pro", please have a look at the changes in the README, the notable things are:

CRMBMuser commented 6 years ago

Hi @zougloub,

Thank you for your answer! Actually I'm on Win7 Pro.

This might have been a slight misunderstanding on my end when I read the README because I installed Docker Toolbox and not Docker. I thought Docker was only compatible for Win10 Pro.

I did two things following you message:

Unfortunately, I haven’t seen any changes so far for sharing files between the two systems.

Do you think I should switch to Docker instead? Should I use the ‘mount’ command in Linux?

Thank you for your patience!

Best,

alexfoias commented 5 years ago

With the help of @lrouhier, the shared docker folder has the correct permissions.

Right click on the docker_shared_folder-Properties-Security. And grant full control for everyone.

See the screenshots here: Screen Shot 2019-08-01 at 2 06 42 PM

Screen Shot 2019-08-01 at 2 06 36 PM

zougloub commented 5 years ago

Maybe Docker Toolbox (or VirtualBox) creates a Docker user, which could be used instead of Everyone?

lrouhier commented 5 years ago

I just tried it and I think that allowing only the current user and system is enough.

jcohenadad commented 5 years ago

great, so if this issue is solved, can you please update the documentation?

lrouhier commented 5 years ago

That's not enough for toolbox. I think I found a workaround (thanks to this website )

Mount an arbitrary host directory in a Docker container

-Restart Docker Machine, with docker-machine start. -SSH into the Docker Machine, with docker-machine ssh.

the docker shared folder correspond to the one in your user folder

if you cant' write inside check the permisiion from the windows host as @alexfoias mentionned.

jcohenadad commented 5 years ago

hum... i wasn't aware we also had VirtualBox dependency for sct-docker (with Docker Toolbox). Is that so? Or maybe Docker Toolbox is somewhat related to VirtualBox?

lrouhier commented 5 years ago

Yes docker toolbox Is running on a VM that he created with virtualbox

jcohenadad commented 5 years ago

ok, so if this workaround works, i suggest we document it, unless @zougloub has something to say

zougloub commented 5 years ago

Please submit a merge request with updated documentation @lrouhier :+1:

jcohenadad commented 5 years ago

@lrouhier any update on this?

lrouhier commented 5 years ago

I'm writing it right now. I will open a PR when it's done.

lrouhier commented 5 years ago

I need access to the repository to push the change into my new branch.

jcohenadad commented 5 years ago

I need access to the repository to push the change into my new branch.

you've just been invited

jcohenadad commented 5 years ago

Fixes by #34, #36