Login issue in rstudio
Bug Description
There is currently a problem logging into RStudio using the credentials:
- username: carya
- password: illinois
PR #3527 introduces some changes to mitigate this issue.However, even after that fix, login may still fail This issue arises from recent changes in the upstream rocker image, which affect how users and permissions are handled inside the RStudio container.
Details
- Upstream Changes in rocker Image:
- Recent versions of the
rocker/rstudioimage automatically create a default user namedrstudio. - This default user uses UID and GID 1000, which conflicts with the creation of the custom user carya during container initialization as from the env file it takes
UIDandGIDas 1000.
- Recent versions of the
- Conflict with PEcAn Custom User Creation:
- In the PEcAn Docker setup, the script
rstudio.shexpects a USER argument https://github.com/PecanProject/pecan/blob/38df06107037b24eacc02aec061966f40cf49ded/docker/base/rstudio.sh#L5 But we are passingDEFAULT_USERfrom docker compose environment.
- In the PEcAn Docker setup, the script
To Reproduce
Try to login to rstudio with username with the creds given above.
Expected behavior
RStudio login with username carya and password illinois should work, and /home/carya should contain the pecan folder.
workaround
Setting UID=1001 and GID=1001 for carya in docker-compose.yml avoids conflict with the default rstudio user (UID 1000), though i am not sure this may introduce permission issues elsewhere that need further validation.
this only happens if the UID=1000 any other number will work.
The default is UID=1001 in the docker compose file, so you need to explicitly set the UID to 1000.