REF: RStudio server in Docker does not start up
I am now trying the same thing but using the latest 1.4 Preview version. Figured I'll share a bit more information about how I do this (regardless of the embarrassment of the poor install file).
Here is how I install RStudio Server
#!/bin/bash
set -o nounset -o errexit -o pipefail
mkdir -p /tmp/rstudio-temp
cd /tmp/rstudio-temp
apt-get update && apt-get install -y gdebi libapparmor1
wget -q https://s3.amazonaws.com/rstudio-ide-build/server/bionic/amd64/rstudio-server-1.4.869-amd64.deb
gdebi -n rstudio-server-1.4.869-amd64.deb
ln -sf /usr/lib/rstudio-server /usr/local/lib/rstudio-server
chown -R root:root /usr/lib/rstudio-server
cd ~
rm -rf /tmp/rstudio-temp
echo "www-frame-origin=any" >> /etc/rstudio/rserver.conf
chown ubuntu:ubuntu /etc/rstudio/rserver.conf
#Make rmarkdown::render work outside of rstudio. https://github.com/rstudio/rmarkdown/blob/master/PANDOC.md
ln -sf /usr/lib/rstudio-server/bin/pandoc/pandoc /usr/local/bin
ln -sf /usr/lib/rstudio-server/bin/pandoc/pandoc-citeproc /usr/local/bin
rm -rf /var/lib/apt/lists/*
That works just fine.
This is how I start it up
#!/bin/bash
set -o nounset -o errexit -o pipefail
#Configure Spark if present
if [ -n "${SPARK_HOME:-}" ]; then
echo ".libPaths(c(file.path(Sys.getenv('SPARK_HOME'), 'R', 'lib'), .libPaths()))" >> ~/.Rprofile
fi
# Set environment variable for where the history file will be stored
export R_HISTFILE='domino.Rhistory'
printenv >> ~/.Renviron
# Set initial working directory, which is the diretory RStudio opens up to
mkdir -p ~/.rstudio/monitored/user-settings/
echo -e "initialWorkingDirectory=\"${DRT_WORKING_DIR:-"${DOMINO_WORKING_DIR}"}\"\n" >> ~/.rstudio/monitored/user-settings/user-settings
mkdir -p /tmp/rstudio-server
RSTUDIO_SERVER_DATA_DIR=/tmp/rstudio-server
/usr/lib/rstudio-server/bin/rserver --www-port=8888 --auth-none=1 --server-daemonize=0 --server-data-dir="$RSTUDIO_SERVER_DATA_DIR" --server-pid-file="$RSTUDIO_SERVER_DATA_DIR/rstudio-server.pid"
There is really not much else to say except it just will not start. Any ideas are more than welcome at this point.
Thank you
Petter