Bioconductor / bioconductor_full

[DEPRECATED] Docker Images which include a complete installation of all software needed to build all Bioconductor packages
http://bioconductor.org/help/docker/
GNU General Public License v2.0
25 stars 4 forks source link

Why bioc and rstudio users? #6

Open lwaldron opened 5 years ago

lwaldron commented 5 years ago

In the documentation, can you explain the reason for having two different users (rstudio and bioc) on the image? And, is it OK for the user to run the image interactively using the rstudio user, or is it a requirement to use the different usernames for the different purposes?

nturaga commented 5 years ago

The reason for the bioc user in the image is to give the users another option other than rstudio. The rights and permissions to the bioc user are identical. I will explain it in the documentation, thanks for bringing this to my attention @lwaldron.

The initial idea was rstudio user should be saved for use when using the image through rstudio on the browser. And bioc user was for interactive use, when not root. But you can login through the rstudio user as well interactively.

I don't know if this sufficiently answers your question? Maybe @mtmorgan can add some commentary about this as well?

mtmorgan commented 5 years ago

if they're 'the same' then maybe it's better to have a single user -- 'bioc', or is the 'rstudio' user created earlier in the Docker hierarchy?

nturaga commented 5 years ago

@mtmorgan rstudio is created earlier in the hierarchy as it comes from the rocker images. It might be easier to add this as part of the modifications which need to be done in the "new" docker images coming up?

lwaldron commented 5 years ago

Sort of, but it still seems confusing. Does this rephrasing make sense?

This image provides two built-in users: rstudio and bioc. They are equivalent. rstudio is created earlier in upstream rocr images and bioc created by this image, but it doesn't matter which one you use. Note that when you mount a host volume within Docker, your user within Docker is mapped to the host user regardless of your username within Docker.

lshep commented 5 years ago

I think we need the rstudio user to access rstudio on the docker? wasn't this the case and why we had too? Because we felt it odd for Bioc users to use a rstudio user id ?

nturaga commented 5 years ago

We can access the rstudio user via this command interactively, just like we access the bioc user.

docker run -it --user rstudio bioconductor/bioconductor_full bash

Access to rstudio user was not one of the reasons. Not that I can remember.

nturaga commented 5 years ago

Sort of, but it still seems confusing. Does this rephrasing make sense?

This image provides two built-in users: rstudio and bioc. They are equivalent. rstudio is created earlier in upstream rocr images and bioc created by this image, but it doesn't matter which one you use. Note that when you mount a host volume within Docker, your user within Docker is mapped to the host user regardless of your username within Docker.

This makes sense to me @lwaldron.

mtmorgan commented 5 years ago

I think currently its possible to use rstudio either through RStudio or the shell, but is it possible to use 'bioc' through RStudio?

nturaga commented 5 years ago

I think currently its possible to use rstudio either through RStudio or the shell, but is it possible to use 'bioc' through RStudio?

@mtmorgan , I don't think so. RStudio browser works only with the rstudio user. Since the rstudio user doesn't have sudo privileges, we cannot change the user from within to bioc from the RStudio provided Terminal.

lshep commented 5 years ago

Right that's what I was trying to get at above - we need the rstudio user for rstudio on the docker.

mtmorgan commented 5 years ago

So I think we introduced the 'bioc' user because it seemed more appropriate for a Bioconductor docker container.

I think the fact that we can't use Rstudio as user bioc is a limitation that we could overcome, if its worth while, and then I would really suggest just not mentioning the rstudio user; also in Levi's suggestion above I'm not really sure how exposing the implementation details (rocr base image creates rstudio user is helpful to the user?

On the other hand if we can't figure out how to be 'bioc' in RStudio, then we should probably remove the bioc user. But I think we can get the bioc user up under RStudio -- they would need an account registered with RStudio Server in our docker image... I think this script is run at login

https://github.com/rocker-org/rocker-versioned/blob/c0ae4007760a1e3bf869a5a36486e5dae0979ad3/rstudio/devel/userconf.sh#L26

and I get to be user 'bioc' in RStudio with

docker run -e USER=bioc -e DISABLE_AUTH=true -p 8787:8787 \
    bioconductor/bioconductor_full:devel

didn't have any luck setting a password, but presumably that is possible.... Note that I'm not running docker with --user=bioc, but logging in to RStudioServer as user 'bioc'.