diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 4819ce9..2dd0d11 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -21,6 +21,7 @@ jobs: matrix: config: - {name: code-server} + - {name: rstudio} name: ${{ matrix.config.name }} steps: - name: Check out the repo diff --git a/rstudio/03_setup_root_path.sh b/rstudio/03_setup_root_path.sh new file mode 100644 index 0000000..e282d68 --- /dev/null +++ b/rstudio/03_setup_root_path.sh @@ -0,0 +1,11 @@ +#!/usr/bin/with-contenv bash + +echo "root path: $WWW_ROOT_PATH" + +if [[ ! -z $WWW_ROOT_PATH ]] +then + echo "Set www-root-path to $WWW_ROOT_PATH" + echo "www-root-path=$WWW_ROOT_PATH" >> /etc/rstudio/rserver.conf +else + echo "Not setting www-root-path" +fi diff --git a/rstudio/04_copy_env.sh b/rstudio/04_copy_env.sh new file mode 100644 index 0000000..b8e0984 --- /dev/null +++ b/rstudio/04_copy_env.sh @@ -0,0 +1,3 @@ +#!/usr/bin/with-contenv bash + +printenv >> /home/$USER/.Renviron diff --git a/rstudio/Dockerfile b/rstudio/Dockerfile new file mode 100644 index 0000000..6d4643a --- /dev/null +++ b/rstudio/Dockerfile @@ -0,0 +1,10 @@ +FROM rocker/verse:4.3.2 + +LABEL maintainer "Arnfinn Hykkerud Steindal " + +RUN echo "www-frame-origin=same" >> /etc/rstudio/disable_auth_rserver.conf \ + && echo "www-verify-user-agent=0" >> /etc/rstudio/disable_auth_rserver.conf + +COPY 03_setup_root_path.sh /etc/cont-init.d/03_setup_root_path.sh + +COPY 04_copy_env.sh /etc/cont-init.d/04_copy_env.sh