Skip to content

Instantly share code, notes, and snippets.

@mlgrm
Last active April 9, 2019 16:54
Show Gist options
  • Save mlgrm/5adb1349000782041631c0d87fa65512 to your computer and use it in GitHub Desktop.
Save mlgrm/5adb1349000782041631c0d87fa65512 to your computer and use it in GitHub Desktop.
#!/bin/bash
# usage: curl -sL bit.ly/mlgrm-traefiker-rstudio | [USER=user] [PASSWD=passwd] bash
if [[ -z $PASSWD ]]; then PASSWD=$(apg -n 1) && >&2 echo "password: $PASSWD"; fi
USER=${USER:-$USER}
#if [[ -n $(docker network list --filter name=postgres -q) ]]; then PG_NETWORK="--network postgres"; fi
curl -sL bit.ly/mlgrm-traefiker |
HOSTNAME=rstudio:shiny PORT=8787:3838 SERVICE=rstudio:shiny \
bash -s -- run -d \
-v /mnt/disks/data/home:/home \
-e USER=$USER \
-e PASSWORD=$PASSWD \
-e ROOT=TRUE \
-e ADD=shiny \
--name rstudio \
--hostname rstudio \
$PG_NETWORK \
mlgrm/tidyverse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment