3

I'm running boot2docker v1.2.0 on windows 7 and have followed the instructions for folder sharing.

I get messages in the docker console indicating that the samba server is starting, and when I do docker logs samba-server I get some output that looks like it's working:

docker@boot2docker:~$ docker logs samba-server
Setting up samba cfg --start my-data1 /data
add /data
Starting Samba daemons: nmbd smbd.
watching /var/log/samba/*
==> /var/log/samba/cores <==

==> /var/log/samba/log.nmbd <==
[2014/08/30 20:24:28,  0] nmbd/nmbd.c:861(main)
  nmbd version 3.6.6 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2011

==> /var/log/samba/log.smbd <==
[2014/08/30 20:24:28,  0] smbd/server.c:1053(main)
  smbd version 3.6.6 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2011
tail: error reading `/var/log/samba/cores': Is a directory
tail: /var/log/samba/cores: cannot follow end of this type of file; giving up on
 this name
[2014/08/30 20:24:28.448867,  0] printing/print_cups.c:110(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/08/30 20:24:28.449807,  0] printing/print_cups.c:487(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL

==> /var/log/samba/log.nmbd <==
[2014/08/30 20:24:51,  0] nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)

  *****

  Samba name server 45DFC66E7CED is now a local master browser for workgroup WOR
KGROUP on subnet 172.17.0.10

  *****
docker@boot2docker:~$

But when I go to Windows Explorer and type in \\192.168.59.103\data I get nothing but an error message:

enter image description here

I've tried just about everything suggested here: Cannot connect to a shared network drive and most of the suggestions here: network error 0x80070035 the network path was not found

I've also tried the suggestions at https://github.com/SvenDowideit/dockerfiles/issues/1 with no change.

I see here that installing cifs-utils using tce-load worked, but I'm not sure how to do that. When I run tce-load -wi cifs-utils at the boot2docker prompt, I get wget: server returned error: HTTP/1.1 404 Not Found. I can install this ok: tce-load -wi sshfs-fuse though I'm not sure what to do next. When I ping google.com I get responses, so I think my internet connection through boot2docker is ok.

How to make folder sharing work between boot2docker and the windows 7 host?

2 Answers 2

5

I got file sharing working by deleting all the boot2docker and virtualbox dot files and folders, uninstalling boot2docker and virtualbox, and then regressing through previous versions of virtualbox until I got to 4.3.12 and then folder sharing worked exactly as described.

UPDATE

Now I'm using boot2docker v1.3.1 and it works fine with the version of VirtualBox that is bundled with the installer, no need to revert to an older version, and the -v flag works for folder sharing on windows, just as it does on Linux/OSX. So to share folders I'm doing this:

docker run -d -p 8787:8787 -v /c/Users/foobar:/home/rstudio/foobar rocker/rstudio

In this case, /c/Users/foobar corresponds to an existing folder on my computer at C:/Users/foobar, and foobar can be anything. With this method I can read and write files both ways between Windows and RStudio and I don't need to connect to a special IP address like the samba method does in the official docs

1

Looking at the file you have posted, your docker machine is running at 172.17.0.10, not 192.168.59.103. When you boot up the image, add the --bip=192.168.59.103/24 or whatever subnet you wish to use to it, to attach that specific IP. Otherwise, it just NATS

1
  • Thanks for taking a look, do you mean to try boot2docker ssh --bip=192.168.59.103/24? Because that makes no difference. I am running boot2docker ip in another terminal each time I test this, and ever time it's 192.168.59.103, as suggested by the instructions. Putting 172.17.0.10 in the explorer bar also does nothing.
    – Ben
    Sep 3, 2014 at 5:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .