Skip to content

Instantly share code, notes, and snippets.

@Martins6
Last active September 2, 2023 14:01
Show Gist options
  • Save Martins6/d7d20e4a61f80d1bea3b7db42d92fa36 to your computer and use it in GitHub Desktop.
Save Martins6/d7d20e4a61f80d1bea3b7db42d92fa36 to your computer and use it in GitHub Desktop.
Shell script to run RStudio on Docker on a M2 Mac.
# Three main sources for this script:
# https://github.com/rocker-org/rocker-versioned2/issues/144
# https://jsta.github.io/r-docker-tutorial/02-Launching-Docker.html
# https://stackoverflow.com/questions/65456814/docker-apple-silicon-m1-preview-mysql-no-matching-manifest-for-linux-arm64-v8
# After running the script, access the RStudio on the address http://localhost:8787/
docker run --rm \
--platform linux/x86_64 \
-p 8787:8787 \
-e PASSWORD=YOURNEWPASSWORD \
-e DISABLE_AUTH=true \
-u 0 \
-v /{YOUR_LOCAL_PATH}:/home/rstudio/ \
rocker/verse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment