Search code examples
dockerrstudiocentos7rstudio-server

How to I bypass the login page on Rstudio?


I am trying to bypass the login page on RStudio as we are running it in a Docker container and this step is not necessary as we authenticate before we let users launch the container.

I am using the Rocker implementation of RStudio for Docker. We are running on Centos7.

I'm fairly new to SO, so please let me know what information would be helpful for answering the question.


Solution

  • I figured it out.

    When you start rserver, add the flag --auth-none=1, so my final CMD in my Dockerfile looked like:

    USER rstudio
    CMD ["/usr/lib/rstudio-server/bin/rserver","--server-daemonize=0","--auth-none=1"]
    

    I will caution though, the first time I did it, I ran with sudo -E in front of the command and it logged into RStudio as ROOT! (this is also because I had altered the /etc/rstudio/rserver.conf with the setting auth-minimum-user-id=0 because I was trying to get the error to go away (which it did :)

    The above code will change to user 'rstudio' before running the command which will log you straight in as rstudio.

    Hope that helps someone out there, I know I spent the better portion of my day finding a work-around!