{"id":16284415,"url":"https://github.com/nuest/x11rockerstudio","last_synced_at":"2026-01-19T09:35:17.439Z","repository":{"id":146971968,"uuid":"99819855","full_name":"nuest/x11rockerstudio","owner":"nuest","description":"RStudio Desktop... in a container... for the sake of trying.","archived":false,"fork":false,"pushed_at":"2021-10-05T23:59:57.000Z","size":17,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T00:04:47.464Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nuest.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-09T14:49:29.000Z","updated_at":"2024-12-16T11:39:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"97948eb0-aec3-45af-879d-637b46373b7b","html_url":"https://github.com/nuest/x11rockerstudio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nuest/x11rockerstudio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuest%2Fx11rockerstudio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuest%2Fx11rockerstudio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuest%2Fx11rockerstudio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuest%2Fx11rockerstudio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nuest","download_url":"https://codeload.github.com/nuest/x11rockerstudio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuest%2Fx11rockerstudio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28565001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T08:53:44.001Z","status":"ssl_error","status_checked_at":"2026-01-19T08:52:40.245Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T19:19:29.239Z","updated_at":"2026-01-19T09:35:17.424Z","avatar_url":"https://github.com/nuest.png","language":null,"readme":"# RStudio Desktop in container\n\nThis repository contains some tests to run [RStudio](http://rstudio.com/) Desktop, an IDE for [R](https://r-project.org), in a container.\n\nA first approach is based on [Rocker](https://github.com/rocker-org/rocker) and/or [x11docker](https://github.com/mviereck/x11docker).\nTwo variants are evaluated here:\n\n- using `x11docker/lxde` base image, installing R + RStudio\n- using `rocker/verse`, installing the UI and stuff according to x11docker's Dockerfile, and install RStudio\n\nBoth these projects use Debian base images, which helps a lot.\n\nAnother approach is sharing the host's X11 socket as shown by [Fábio Rehm](http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/) (originally [for Netbeans](https://github.com/fgrehm/docker-netbeans)).\n\nA third approach is [Subuser](http://subuser.org). It _\"turns Docker containers into normal linux programs\"_. Its focus lies on isolated and consistent environments for programmes.\n\n**Are you aware of any other approaches? Great! Please open an issue.**\n\n## Results\n\n### x11docker base image with R\n\nThe following commands require x11docker to be install (clone the repo, then run `sudo x11docker --install`). If you prefer not to do that, add the full path to `x11docker` binary in the commands below.\n\n```bash\ndocker build --tag x11rockerstudio  --file x11docker-base/Dockerfile .\n\n# for testing: docker run --rm -it --entrypoint /bin/bash x11docker/lxde\n\n# start container with LXDE desktop:\nx11docker --desktop --sudo --net --clipboard x11rockerstudio\n\n# start container and only start RStudio\nx11docker --desktop --sudo --net --clipboard x11rockerstudio /usr/lib/rstudio/bin/rstudio\n```\n\n### Rocker base image with x11docker\n\n```bash\ndocker build --tag rockerstudiox11 --file rocker-base/Dockerfile .\n\n# start container:\nx11docker --desktop --sudo --net --clipboard rockerstudiox11\n```\n\nThe following command is shown by x11docker to be actually executed:\n\n```bash\ndocker run --user 1000:1000 --group-add video --env USER=daniel -v /home/daniel/.cache/x11docker/X200/passwd:/etc/passd:ro --cap-drop=ALL --security-opt=no-new-privileges --read-only --volume=/tmp --rm --name=x11docker_X200_42a446_rockerstudiox11 --entrypoint= -v /home/daniel/.cache/x11docker/X200/share:/x11docker:ro -e DISPLAY=unix:200 -e XAUTHORITY=/x11docker/Xclientcookie -v /tmp/.X11-unix/X200:/tmp/X200:ro --net=host -- rockerstudiox11 /bin/bash /x11docker/x11docker_CMD\n```\n\nThis partially shows x11docker works, and how user settings are translated to Docker configuration.\n\n### X11 socket sharing with Rocker base images\n\nThis approach works quite well and is most lightweight, because there is no full desktop in the container.\n\n```bash\ndocker build --tag rstudioxhost --file xhost/Dockerfile .\n\n# build image based on rocker/verse with many packages installed\ndocker build --tag rstudioxhost:verse --file xhost/Dockerfile.verse .\n\n# start the container\ndocker run -it --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix rstudioxhost\n\ndocker run -it --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix rstudioxhost:verse\n```\n\nYou can even create one Docker image that has both RStudio variants if you use `rocker/rstudio` as the base image.\n\n#### X11 and Docker\n\nOn Linux, we simply forward our X11 info with the Docker container. This sections provides some background and resources on GUI applications in Docker, including security implications, because the container can receive all X11 events that happen on the host computer desktop.\n\n- [`x11docker`'s README on the topic]()\n- http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/\n- http://wiki.ros.org/docker/Tutorials/GUI with a \"simple\" way, a \"saver way\" and an \"isolated\" way (the approach above uses the _simple_ one!, the _isolated_ requires changes in the Dockerfile), and other alternatives (ssh, VNC)\n\n### Subuser\n\n[**WORK IN PROGRESS**](https://github.com/nuest/x11rockerstudio/issues/1)\n\nFollowing the [short packaging guide](http://subuser.org/packaging.html), the subuser `subrstudio` can be found in the directory of the same name.\nThe Dockerfile starts with the `libx11` Subuser image, which in turn is based on Debian (see [libx11 SubuserImagefile](https://github.com/subuser-security/subuser-default-repository/blob/latest/libx11/image/SubuserImagefile) and [libdebian SubuserImagefile](https://github.com/subuser-security/subuser-default-repository/blob/latest/libdebian/image/SubuserImagefile) in the [subuser default repository](https://github.com/subuser-security/subuser-default-repository)).\n\n```bash\n# add required libx11\nsubuser subuser add libx11 libx11@default\n\n# build the subuser locally\nsubuser subuser add subrstudio subrstudio@./\n\n# see if it is installed\nsubuser list installed-images\n\n# run it\nsubuser run subrstudio\n\n# remove it\nsubuser subuser remove subrstudio\n```\n\nThis approach could probably extended by providing a stack of subusers, e.g. `subr-base`, `subr-verse`, `subr-rstudio` etc.\n\n## Conclusion\n\nWell, all approaches work... but there is no relevant advantage over running RStudio in the browser using `rocker/rstudio`. As far as my research goes, there is [no](https://support.rstudio.com/hc/en-us/articles/217799198-What-is-the-difference-between-RStudio-Desktop-and-RStudio-Server-) [functional]( https://support.rstudio.com/hc/en-us/articles/200486548-Frequently-Asked-Questions) [difference](https://rud.is/b/2017/04/07/r%E2%81%B6-rstudio-server-client-make-an-app-for-that/) between either [versions](https://www.rstudio.com/products/rstudio/features) (RStudio desktop is indeed a very [lightweight wrapper for a web UI](https://rpubs.com/jmcphers/rstudio-architecture)).\n\nA small advantage could exist using the first approach, at least for users with a high affinity to UIs. They can manage the virtual workspace with a proper desktop besides RStudio.\nThings are containerized though, so there is some advantage for reproducibility, if users do not mount relevant stuff into the container.\n\n`x11docker` go to great lengths to handle security issues around exposing an X server, not all of which I can grasp at this point, and hides all that complexity from the user with (probably) sensible defaults.\nSubuser follows a similar approach based on [xpra](https://xpra.org/) to better control the containers rights.\n\nAs pointed out in the blog post discussion [here](http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/#comment-1973698881), Docker is faster than firing up a whole VM and in all cases presented here, a Docker host does not only share the Kernel but also the X11 display with the container.\n\n\u003e _\"The downside as mentioned a couple places is the security implications of letting the container watch ALL X11 traffic.\"_\n\nIt is left to each users discretion to decide which of these approaches work for her, i.e. which level of permission control are acceptible and which supporting project is trustworthy.\n\n## License\n\nRocker's Dockerfiles are licensed under the GPL 2 or later.\n\nx11docker is licensed under the MIT License.\n\nThe Dockerfiles and all code in this repository are licensed under the GPL 2 or later (see file `LICENSE`). Non-code objects in this repository are licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuest%2Fx11rockerstudio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnuest%2Fx11rockerstudio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuest%2Fx11rockerstudio/lists"}