----- Original Message ----- > From: "Dan Tenenbaum" <dtene...@fredhutch.org> > To: "Elena Grassi" <grass...@gmail.com> > Cc: bioc-devel@r-project.org > Sent: Thursday, January 8, 2015 10:18:50 AM > Subject: Re: [Bioc-devel] Announcing Docker containers for Bioconductor > > > > ----- 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. >
You no longer need to do any of the above; the bioconductor containers now behave like rocker's in this regard (and the web page has been updated accordingly). You will need to re-pull the image: docker pull bioconductor/devel_sequencing Then you should be able to do docker run -e USER=$USER -e USERID=$UID -v /home/data/Dropbox/work/matrix/mr_bioc/matrix_rider/:/opt/matrix_rider -p 8787:8787 bioconductor/devel_sequencing Then log into Rstudio as user 'data' with password 'rstudio'. And you should be able to read/write the files in /opt/matrix_rider. Dan _______________________________________________ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel