Running RStudio Connect through a docker container

Hi,
We're looking at getting started with RStudio Connect and wondered whether anyone has experience of running this through a docker container (the idea being that we could make use of the rocker images for Linux dependencies and R version control)?
If so, are there any performance issues that we might need to look out for?
Thanks,
Nick

1 Like

I'm guessing that you already saw this larger thread about Docker and the specific post from @jclemens1 about licensing issues, but just in case:

Also, this SO Q&A has some good general thoughts:

Unfortunately, I don't have any personal performance comparisons to provide!

1 Like

Running RStudio Connect in a container is possible but, in general, is not recommended. Connect is designed to isolate and sandbox user applications. In essence, Connect runs its own "containers". To do so requires root, which means for Connect itself to run in a container requires privileged access.

To address your needs, I'd instead recommend recommend running Connect in a persistent server. Connect is designed to use and support multiple versions of R. This flexibility ensures that content can be "deployed and forgotten" by R users who invariably will use multiple versions of R. We recommend building R from source in a directory structure that contains the R version, for example:

/opt/R/3.4.1
/opt/R/3.3.3
/opt/R/3.2.5

Instructions: http://docs.rstudio.com/connect/admin/r.html

The admin guide also includes a list of suggested system dependencies for R packages:
Ubuntu - http://docs.rstudio.com/connect/admin/getting-started.html#installation-ubuntu
REHL / CentOS - http://docs.rstudio.com/connect/admin/getting-started.html#installation-redhat

If you wish to pursue the Docker container further, please contact your Customer Success rep.

Best,

Sean

2 Likes

@nick Thanks, stack overflow link was interesting.

@slopp Thanks. One of the main reasons to use docker was to help manage the linux dependencies (via rocker - our production environments have a principle of tearing down and rebuilding the underlying servers based on scripted builds and this would be one less part of the script we would need to maintain).

Cheers,
Nick

1 Like

Quick update! We have added further instructions for those interested in running RStudio Connect in Docker to the RStudio Connect admin guide: http://docs.rstudio.com/connect/1.6.6/admin/server-management.html#server-docker

4 Likes