Skip to content

Instantly share code, notes, and snippets.

@DoktorMike
Created March 7, 2020 10:57
Show Gist options
  • Save DoktorMike/bb3fb148b584335cbe580e5671e97821 to your computer and use it in GitHub Desktop.
Save DoktorMike/bb3fb148b584335cbe580e5671e97821 to your computer and use it in GitHub Desktop.
Run RStudio server in docker
#!/bin/bash
# ____ ____ _ _ _ ____ _
# | _ \/ ___|| |_ _ _ __| (_) ___ _ | _ \ ___ ___| | _____ _ __
# | |_) \___ \| __| | | |/ _` | |/ _ \ _| |_ | | | |/ _ \ / __| |/ / _ \ '__|
# | _ < ___) | |_| |_| | (_| | | (_) | |_ _| | |_| | (_) | (__| < __/ |
# |_| \_\____/ \__|\__,_|\__,_|_|\___/ |_| |____/ \___/ \___|_|\_\___|_|
#
# Idea from https://medium.com/@guidoman/tutorial-install-and-run-rstudio-server-with-docker-5e67607811a0
# Based on the awesome rocker/tidyverse image
# Create a volume so we can persist data
docker volume create rstudiodata
# Start the docker container
docker run -d --name rstudio -v rstudiodata:/home/rstudio -e PASSWORD=supersecretpassword -p 8787:8787 rocker/tidyverse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment