rocker-org / rocker

R configurations for Docker
https://rocker-project.org
GNU General Public License v2.0
1.46k stars 271 forks source link

running as root #476

Closed paupaiz closed 3 years ago

paupaiz commented 3 years ago

I used the -e ROOT=true option and still got the issue on the picture attached (i.e. running whoami still returns rstudio). Any suggestions greatly appreciated!

Screen Shot 2021-11-23 at 8 11 42 AM
eddelbuettel commented 3 years ago

running whoami still returns rstudio

So you're not the root user. This depends also on how you launch docker.

$ docker run -ti --rm r-base whoami
root
$ 
paupaiz commented 3 years ago

In the container I am. In rstudio I am not but I want to access a bind mount that is on root dir (I tried putting it after /home/.cache but for some reason gets changed to /root/.cache)

Screen Shot 2021-11-23 at 8 39 00 AM
eddelbuettel commented 3 years ago

We are in the wrong repo within rocker here. You are having rstudio usage questions (the RStudio product runs as user 'rstudio') so I suggest I transfer this to repo rocker-versioned2.

One short way out is to look into docker exec to get yourself a second shell inside the running container.

Edit Oh, sorry, your screen shot already shows docker exec so you know that already.

eddelbuettel commented 3 years ago

Closing this as refiled in versioned2.