Closed Tianmaru closed 3 months ago
IMHO this means that either
or
[^1]: "userns-remap": "default"
set in /etc/docker/daemon.json
@Tianmaru What you describe is the expected behaviour – for both cases.
If one does not set RUNROOTLESS
to either true
or false
, 'Rootless mode'/'userns-remap
mode' is auto-detected: https://github.com/rocker-org/rocker-versioned2/blob/1cda649c277a11f3989e74670706b290a3226e30/scripts/init_userconf.sh#L13-L17
This is all by design (thanks to @zeehio) and works as intended.
Hi @Tianmaru,
Docker by default is installed in root mode, meaning that you must have root permissions to run containers.
You can set up docker in rootless mode to be able to run containers as a regular user in a safe way. Apparently you did that, (great!). It would be nice to know if you are aware of that setup.
When you run docker in rootless mode, your containers appear to run under the root
user, that it is mapped to your actual user at the docker host. That's why in that scenario you should login as root
and not as rstudio
.
The rocker image detects it is running in rootless mode, and reports to you that you should be using the root
user:
Under rootless mode,
- You will log in using 'root' as user
My proposal would be to clarify the paragraph in the website:
Current:
The non-root default user rstudio is set up as RStudio Server user, so please enter the username rstudio and a randomly generated password which is displayed in the console to the RStudio login form.
Proposed:
The non-root default user rstudio is set up as RStudio Server user, so please enter the username
rstudio
and a randomly generated password which is displayed in the console to the RStudio login form. If your container system runs rootless, you will have to use theroot
user to login. In this case the privileges of theroot
user in the container are already bounded by your regular user permissions in the host system.
@Tianmaru, do you think this change would address your issue?
Thanks!
Sorry, it seems like I wasted your time due to my lack of experience with docker - yes, docker is indeed running in rootless mode, so everything is working as expected. However, I think the proposed change of the website helps to clarify the login situation nonetheless. Thank you!
Sorry, it seems like I wasted your time due to my lack of experience with docker - yes, docker is indeed running in rootless mode, so everything is working as expected. However, I think the proposed change of the website helps to clarify the login situation nonetheless. Thank you!
I liked your issue because (1) it helps clarify the documentation and (2) it shows rootless docker works quite well with rocker images. Thanks for reporting this!
When I start a Rstudio Server Docker container via
docker run --rm -ti -p 8787:8787 rocker/rstudio
, it apparently deletes therstudio
user. Although the website instructs to login as userrstudio
with the generated password, the login is only possible asroot
:When running the container in interactive mode, an error message about the missing user
rstudio
is shown when attempting to login:I had to add
-e RUNROOTLESS=false
for being able to login withrstudio
. I think this should be mentioned on the website.