Skip to content

Instantly share code, notes, and snippets.

@RamiKrispin
Created September 19, 2022 12:26
Show Gist options
  • Save RamiKrispin/fff84af2622927d82d1dd369d77e3210 to your computer and use it in GitHub Desktop.
Save RamiKrispin/fff84af2622927d82d1dd369d77e3210 to your computer and use it in GitHub Desktop.
RStudio_server_docker.sh
#!/bin/bash
# Launching RStuido server on a docker with different settings
# Basic run command to launce rocker container with RStudio Server
docker run -d -p 8787:8787 \
-e USER=rstudio -e PASSWORD=rstudio \
rocker/rstudio:4.2
# Disabling the authentication
docker run -d -p 8787:8787 \
-e DISABLE_AUTH=true \
rocker/rstudio:4.2
# Bind local folder and RStudio config and Renviron files
docker run -d -p 8787:8787 \
-e DISABLE_AUTH=true \
-v $TUTORIAL_WORKING_DIR:/home/rstudio/my_project \
-v $RSTUDIO_CONFIG_PATH:/home/rstudio/.config/rstudio \
-v $HOME/.Renviron:/home/rstudio/.Renviron \
rocker/rstudio:4.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment