----- Original Message ----- > From: "Elena Grassi" <grass...@gmail.com> > To: "Dan Tenenbaum" <dtene...@fredhutch.org> > Cc: bioc-devel@r-project.org > Sent: Thursday, January 8, 2015 8:45:37 AM > Subject: Re: [Bioc-devel] Announcing Docker containers for Bioconductor > > On Thu, Jan 8, 2015 at 4:43 PM, Dan Tenenbaum > <dtene...@fredhutch.org> wrote: > >> I have a strange (ok, at least to me :) ) issue concerning > >> volumes. > >> On a machine (debian testing/unstable up to date) everything works > >> smoothly when I do something like: > >> data@decoder:~$ docker run -v > >> /home/data/Dropbox/work/ > >> matrix/mr_bioc/matrix_rider/:/opt/matrix_rider > >> -p 8787:8787 9f40f8036ad4 > >> (in /home/data/Dropbox/work/matrix/mr_bioc/matrix_rider/ I have a > >> Rstudio project) > > > > What image is 9f40f8036ad4? Why are you not using the > > user/repository name for the image? Is it a rocker image or a > > Bioconductor image? > > Sorry! It's bioconductor/devel_sequencing image that I had pulled > before: > data@decoder:~/Dropbox/work/matrix/matrix_rider$ docker images > REPOSITORY TAG IMAGE ID > CREATED VIRTUAL SIZE > bioconductor/devel_sequencing latest 9f40f8036ad4 > 29 hours ago 5.715 GB > > > Note that Rstudio Server runs as a user called rstudio, not > > necessarily a privileged user. > > So the directory you are trying to mount should probably be > > writable (and readable) by all. > > so try > > > > chmod -R a+rw /home/data/Dropbox/work/matrix/mr_bioc/matrix_rider/ > > On the second machine this works but on this machine I do not love > having this kind of privileges as long as it's shared PC in my office > :) > What puzzles me it's that the privileges were (i.e. not writable and > readable by everyone) the same on both machines and on the first one > it has worked from the first moment without a+rw...I assumed that the > rstudio user has PID 1000 in the container/image and that -e UID= etc > could fix (change it to whatever PID my user has on the host machine) > this but this does not seem the case.
It is not the case. These containers are set up differently than Rocker's. Though I think I will change them to allow this. In the meantime you can accomplish what you want, a bit circuitously. Run a command like this: docker run -p 8787:8787 -e USER=$USER -e USERID=$UID --rm -it -v /home/data/Dropbox/work/matrix/mr_bioc/matrix_rider/:/opt/matrix_rider bioconductor/devel_sequencing bash This opens a shell on the container (as root) where you can do the following: /tmp/userconf.sh # note different location than on rocker # ignore warning that /home/data already exists passwd data # choose a passwd for the user, does not have to match your real password /usr/bin/supervisord Then open a browser to http://localhost:8787 and log in with username 'data' and the password you just set. You should be able to read/write the files in /opt/matrix_rider, assuming you can read/write those files when you are logged in as 'data' and _not_ using docker. I will look at doing this in a way more similar to rocker; I'll let you know when/if this is done. Thanks, Dan In the meantime you can use R from the command line as described in https://github.com/rocker-org/rocker/wiki/Sharing-files-with-host-machine#interactive-containers with the change that userconf.sh is in /tmp so you need to invoke it like this: /tmp/userconf.sh And ignore the warning it gives you that your home directory already exists. > > Thank you very much, > E. > -- > $ pom > _______________________________________________ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel