From e104e5facbaf49ed34378178825a867a8c71de72 Mon Sep 17 00:00:00 2001 From: Mark Milligan Date: Fri, 1 Apr 2022 11:43:39 -0500 Subject: [PATCH 1/2] chore: updated RStudio Dockerfile --- workspaces/editors.md | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/workspaces/editors.md b/workspaces/editors.md index 13513b2b4..263061adf 100644 --- a/workspaces/editors.md +++ b/workspaces/editors.md @@ -319,47 +319,36 @@ Coder supports [RStudio](rstudio.com). To create a workspace that lets you use RStudio: 1. Create a [custom image](../images/writing.md) with RStudio installed, - `rserver` and `pgrep` in `PATH`, and RStudio configured to run on the default - port (`8787`). + `rserver` in `PATH`. To do this, you can refer to the sample Dockerfile below, which installs - RStudio Server Open Source and creates a Unix user to log in with username - `coder` and password `rstudio`. + RStudio Server Open Source to log in with username `coder` and password + `rstudio`. + + > This Dockerfile approach works now with latest versions of RStudio + > including 2022-2-1. ```Dockerfile - FROM ubuntu:20.04 + FROM codercom/enterprise-base:ubuntu USER root # Install dependencies RUN apt-get update && \ DEBIAN_FRONTEND="noninteractive" apt-get install --yes \ - bash \ - sudo \ - git \ - ssh \ - locales \ - wget \ r-base \ gdebi-core # Install RStudio - RUN wget https://download2.rstudio.org/server/bionic/amd64/rstudio-server-1.4.1717-amd64.deb && \ - gdebi --non-interactive rstudio-server-1.4.1717-amd64.deb - - # Create coder user - RUN useradd coder \ - --create-home \ - --shell=/bin/bash \ - --uid=1000 \ - --user-group && \ - echo "coder ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers.d/nopasswd + RUN wget https://download2.rstudio.org/server/bionic/amd64/rstudio-server-2022.02.1-461-amd64.deb && \ + gdebi --non-interactive rstudio-server-2022.02.1-461-amd64.deb # Ensure rstudio files can be written to by the coder user. RUN chown -R coder:coder /var/lib/rstudio-server RUN echo "server-pid-file=/tmp/rstudio-server.pid" >> /etc/rstudio/rserver.conf RUN echo "server-data-dir=/tmp/rstudio" >> /etc/rstudio/rserver.conf RUN echo "www-frame-origin=same" >> /etc/rstudio/rserver.conf + RUN echo "server-user=coder" >> /etc/rstudio/rserver.conf # Remove the following line if you do not run Coder on https RUN echo "server-add-header=X-Forwarded-Proto: https" >> /etc/rstudio/rserver.conf @@ -384,8 +373,8 @@ RStudio: ![Applications with RStudio launcher](../assets/workspaces/rstudio.png) - Sign in using the Unix user (whose username and password you defined in your - image). + Coder auto-signs in using the Unix user (whose username and password you + defined in your custom image above). > RStudio may take a few additional seconds to start launch after the > workspace is built. From 09532d51b2681e2280a1a822b24eff9b41c75c87 Mon Sep 17 00:00:00 2001 From: Mark Milligan Date: Fri, 1 Apr 2022 11:49:41 -0500 Subject: [PATCH 2/2] chore: updated RStudio Dockerfile --- workspaces/editors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspaces/editors.md b/workspaces/editors.md index 263061adf..3b60a3f86 100644 --- a/workspaces/editors.md +++ b/workspaces/editors.md @@ -326,7 +326,7 @@ RStudio: `rstudio`. > This Dockerfile approach works now with latest versions of RStudio - > including 2022-2-1. + > including 2022-2-1. ```Dockerfile FROM codercom/enterprise-base:ubuntu