From 8e5709752513993193fe8e0762ca5d9f2925c833 Mon Sep 17 00:00:00 2001 From: Tyson Swetnam Date: Mon, 17 Jun 2019 08:26:06 -0700 Subject: [PATCH] first commit --- 3.5.0/Dockerfile | 46 +++++++++++++++++++++++++++++++ 3.5.0/README.md | 1 + 3.5.0/nginx.conf.tmpl | 32 ++++++++++++++++++++++ 3.5.0/rserver.conf | 4 +++ 3.5.0/run.sh | 4 +++ 3.5.0/supervisor-nginx.conf | 2 ++ 3.5.0/supervisor-rstudio.conf | 2 ++ 3.5.1/Dockerfile | 46 +++++++++++++++++++++++++++++++ 3.5.1/README.md | 1 + 3.5.1/nginx.conf.tmpl | 32 ++++++++++++++++++++++ 3.5.1/rserver.conf | 4 +++ 3.5.1/run.sh | 4 +++ 3.5.1/supervisor-nginx.conf | 2 ++ 3.5.1/supervisor-rstudio.conf | 2 ++ 3.5.2/Dockerfile | 46 +++++++++++++++++++++++++++++++ 3.5.2/README.md | 1 + 3.5.2/nginx.conf.tmpl | 32 ++++++++++++++++++++++ 3.5.2/rserver.conf | 4 +++ 3.5.2/run.sh | 4 +++ 3.5.2/supervisor-nginx.conf | 2 ++ 3.5.2/supervisor-rstudio.conf | 2 ++ 3.5.3/Dockerfile | 50 ++++++++++++++++++++++++++++++++++ 3.5.3/README.md | 1 + 3.5.3/nginx.conf.tmpl | 32 ++++++++++++++++++++++ 3.5.3/rserver.conf | 4 +++ 3.5.3/run.sh | 4 +++ 3.5.3/supervisor-nginx.conf | 2 ++ 3.5.3/supervisor-rstudio.conf | 2 ++ 3.6.0/Dockerfile | 43 +++++++++++++++++++++++++++++ 3.6.0/README.md | 1 + 3.6.0/nginx.conf.tmpl | 32 ++++++++++++++++++++++ 3.6.0/rserver.conf | 4 +++ 3.6.0/run.sh | 4 +++ 3.6.0/supervisor-nginx.conf | 2 ++ 3.6.0/supervisor-rstudio.conf | 2 ++ README.md | 50 +++++++++++++++++++++++++++++++++- latest/Dockerfile | 43 +++++++++++++++++++++++++++++ latest/README.md | 1 + latest/nginx.conf.tmpl | 32 ++++++++++++++++++++++ latest/rserver.conf | 4 +++ latest/run.sh | 4 +++ latest/supervisor-nginx.conf | 2 ++ latest/supervisor-rstudio.conf | 2 ++ 43 files changed, 593 insertions(+), 1 deletion(-) create mode 100644 3.5.0/Dockerfile create mode 100644 3.5.0/README.md create mode 100644 3.5.0/nginx.conf.tmpl create mode 100644 3.5.0/rserver.conf create mode 100644 3.5.0/run.sh create mode 100644 3.5.0/supervisor-nginx.conf create mode 100644 3.5.0/supervisor-rstudio.conf create mode 100644 3.5.1/Dockerfile create mode 100644 3.5.1/README.md create mode 100644 3.5.1/nginx.conf.tmpl create mode 100644 3.5.1/rserver.conf create mode 100644 3.5.1/run.sh create mode 100644 3.5.1/supervisor-nginx.conf create mode 100644 3.5.1/supervisor-rstudio.conf create mode 100644 3.5.2/Dockerfile create mode 100644 3.5.2/README.md create mode 100644 3.5.2/nginx.conf.tmpl create mode 100644 3.5.2/rserver.conf create mode 100644 3.5.2/run.sh create mode 100644 3.5.2/supervisor-nginx.conf create mode 100644 3.5.2/supervisor-rstudio.conf create mode 100644 3.5.3/Dockerfile create mode 100644 3.5.3/README.md create mode 100644 3.5.3/nginx.conf.tmpl create mode 100644 3.5.3/rserver.conf create mode 100644 3.5.3/run.sh create mode 100644 3.5.3/supervisor-nginx.conf create mode 100644 3.5.3/supervisor-rstudio.conf create mode 100644 3.6.0/Dockerfile create mode 100644 3.6.0/README.md create mode 100644 3.6.0/nginx.conf.tmpl create mode 100644 3.6.0/rserver.conf create mode 100644 3.6.0/run.sh create mode 100644 3.6.0/supervisor-nginx.conf create mode 100644 3.6.0/supervisor-rstudio.conf create mode 100644 latest/Dockerfile create mode 100644 latest/README.md create mode 100644 latest/nginx.conf.tmpl create mode 100644 latest/rserver.conf create mode 100644 latest/run.sh create mode 100644 latest/supervisor-nginx.conf create mode 100644 latest/supervisor-rstudio.conf diff --git a/3.5.0/Dockerfile b/3.5.0/Dockerfile new file mode 100644 index 0000000..cfdc1d0 --- /dev/null +++ b/3.5.0/Dockerfile @@ -0,0 +1,46 @@ +FROM rocker/verse:3.5.0 +MAINTAINER "Tyson Lee Swetnam tswetnam@cyverse.org" +# This image uses the Rocker verse RStudio image - thanks R OpenSci! + +# Add additional R libraries beyond Rocker verse which fit our specific project needs. +RUN install2.r --error \ + # Added Packages + PerformanceAnalytics \ + boot \ + devtools \ + dlm \ + dplyr \ + foreign \ + lubridate \ + plotly \ + truncreg \ + ggridges + +## Install CyVerse VICE Depends +RUN apt-get update && apt-get install -y lsb wget apt-transport-https python2.7 python-requests curl supervisor nginx gnupg2 + +RUN wget -qO - https://packages.irods.org/irods-signing-key.asc | apt-key add - \ + && echo "deb [arch=amd64] https://packages.irods.org/apt/ xenial main" > /etc/apt/sources.list.d/renci-irods.list \ + && apt-get update \ + && apt-get install -y irods-icommands + +ADD https://github.com/hairyhenderson/gomplate/releases/download/v2.5.0/gomplate_linux-amd64 /usr/bin/gomplate +RUN chmod a+x /usr/bin/gomplate + +# provide read and write access to Rstudio users for default R library location +RUN chmod -R 777 /usr/local/lib/R/site-library + +ENV PASSWORD "rstudio1" +RUN bash /etc/cont-init.d/userconf + +COPY run.sh /usr/local/bin/run.sh +RUN chmod +x /usr/local/bin/run.sh + +COPY nginx.conf.tmpl /nginx.conf.tmpl +COPY rserver.conf /etc/rstudio/rserver.conf +COPY supervisor-nginx.conf /etc/supervisor/conf.d/nginx.conf +COPY supervisor-rstudio.conf /etc/supervisor/conf.d/rstudio.conf + +ENV REDIRECT_URL "http://localhost/" + +ENTRYPOINT ["/usr/local/bin/run.sh"] diff --git a/3.5.0/README.md b/3.5.0/README.md new file mode 100644 index 0000000..c0c4025 --- /dev/null +++ b/3.5.0/README.md @@ -0,0 +1 @@ +v3.5.0 diff --git a/3.5.0/nginx.conf.tmpl b/3.5.0/nginx.conf.tmpl new file mode 100644 index 0000000..8f52e79 --- /dev/null +++ b/3.5.0/nginx.conf.tmpl @@ -0,0 +1,32 @@ +daemon off; +worker_processes 1; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + server { + listen 80; + + location / { + proxy_pass http://localhost:8787; + proxy_redirect http://localhost:8787 {{.Env.REDIRECT_URL}}; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_read_timeout 20d; + } + } +} diff --git a/3.5.0/rserver.conf b/3.5.0/rserver.conf new file mode 100644 index 0000000..3182bd5 --- /dev/null +++ b/3.5.0/rserver.conf @@ -0,0 +1,4 @@ +# Server Configuration File + +www-address=127.0.0.1 +rsession-which-r=/usr/local/bin/R diff --git a/3.5.0/run.sh b/3.5.0/run.sh new file mode 100644 index 0000000..ec7b0e4 --- /dev/null +++ b/3.5.0/run.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +gomplate -f /nginx.conf.tmpl -o /etc/nginx/nginx.conf +supervisord -c /etc/supervisor/supervisord.conf -n diff --git a/3.5.0/supervisor-nginx.conf b/3.5.0/supervisor-nginx.conf new file mode 100644 index 0000000..dfa1572 --- /dev/null +++ b/3.5.0/supervisor-nginx.conf @@ -0,0 +1,2 @@ +[program:nginx] +command=nginx diff --git a/3.5.0/supervisor-rstudio.conf b/3.5.0/supervisor-rstudio.conf new file mode 100644 index 0000000..b30e77f --- /dev/null +++ b/3.5.0/supervisor-rstudio.conf @@ -0,0 +1,2 @@ +[program:rstudio] +command=/usr/lib/rstudio-server/bin/rserver --server-daemonize 0 diff --git a/3.5.1/Dockerfile b/3.5.1/Dockerfile new file mode 100644 index 0000000..de9f567 --- /dev/null +++ b/3.5.1/Dockerfile @@ -0,0 +1,46 @@ +FROM rocker/verse:3.5.1 +MAINTAINER "Tyson Lee Swetnam tswetnam@cyverse.org" +# This image uses the Rocker verse RStudio image - thanks R OpenSci! + +# Add additional R libraries beyond Rocker verse which fit our specific project needs. +RUN install2.r --error \ + # Added Packages + PerformanceAnalytics \ + boot \ + devtools \ + dlm \ + dplyr \ + foreign \ + lubridate \ + plotly \ + truncreg \ + ggridges + +## Install CyVerse VICE Depends +RUN apt-get update && apt-get install -y lsb wget apt-transport-https python2.7 python-requests curl supervisor nginx gnupg2 + +RUN wget -qO - https://packages.irods.org/irods-signing-key.asc | apt-key add - \ + && echo "deb [arch=amd64] https://packages.irods.org/apt/ xenial main" > /etc/apt/sources.list.d/renci-irods.list \ + && apt-get update \ + && apt-get install -y irods-icommands + +ADD https://github.com/hairyhenderson/gomplate/releases/download/v2.5.0/gomplate_linux-amd64 /usr/bin/gomplate +RUN chmod a+x /usr/bin/gomplate + +# provide read and write access to Rstudio users for default R library location +RUN chmod -R 777 /usr/local/lib/R/site-library + +ENV PASSWORD "rstudio1" +RUN bash /etc/cont-init.d/userconf + +COPY run.sh /usr/local/bin/run.sh +RUN chmod +x /usr/local/bin/run.sh + +COPY nginx.conf.tmpl /nginx.conf.tmpl +COPY rserver.conf /etc/rstudio/rserver.conf +COPY supervisor-nginx.conf /etc/supervisor/conf.d/nginx.conf +COPY supervisor-rstudio.conf /etc/supervisor/conf.d/rstudio.conf + +ENV REDIRECT_URL "http://localhost/" + +ENTRYPOINT ["/usr/local/bin/run.sh"] diff --git a/3.5.1/README.md b/3.5.1/README.md new file mode 100644 index 0000000..d2613df --- /dev/null +++ b/3.5.1/README.md @@ -0,0 +1 @@ +v3.5.1 diff --git a/3.5.1/nginx.conf.tmpl b/3.5.1/nginx.conf.tmpl new file mode 100644 index 0000000..8f52e79 --- /dev/null +++ b/3.5.1/nginx.conf.tmpl @@ -0,0 +1,32 @@ +daemon off; +worker_processes 1; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + server { + listen 80; + + location / { + proxy_pass http://localhost:8787; + proxy_redirect http://localhost:8787 {{.Env.REDIRECT_URL}}; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_read_timeout 20d; + } + } +} diff --git a/3.5.1/rserver.conf b/3.5.1/rserver.conf new file mode 100644 index 0000000..3182bd5 --- /dev/null +++ b/3.5.1/rserver.conf @@ -0,0 +1,4 @@ +# Server Configuration File + +www-address=127.0.0.1 +rsession-which-r=/usr/local/bin/R diff --git a/3.5.1/run.sh b/3.5.1/run.sh new file mode 100644 index 0000000..ec7b0e4 --- /dev/null +++ b/3.5.1/run.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +gomplate -f /nginx.conf.tmpl -o /etc/nginx/nginx.conf +supervisord -c /etc/supervisor/supervisord.conf -n diff --git a/3.5.1/supervisor-nginx.conf b/3.5.1/supervisor-nginx.conf new file mode 100644 index 0000000..dfa1572 --- /dev/null +++ b/3.5.1/supervisor-nginx.conf @@ -0,0 +1,2 @@ +[program:nginx] +command=nginx diff --git a/3.5.1/supervisor-rstudio.conf b/3.5.1/supervisor-rstudio.conf new file mode 100644 index 0000000..b30e77f --- /dev/null +++ b/3.5.1/supervisor-rstudio.conf @@ -0,0 +1,2 @@ +[program:rstudio] +command=/usr/lib/rstudio-server/bin/rserver --server-daemonize 0 diff --git a/3.5.2/Dockerfile b/3.5.2/Dockerfile new file mode 100644 index 0000000..ef7d763 --- /dev/null +++ b/3.5.2/Dockerfile @@ -0,0 +1,46 @@ +yFROM rocker/verse:3.5.2 +MAINTAINER "Tyson Lee Swetnam tswetnam@cyverse.org" +# This image uses the Rocker verse RStudio image - thanks R OpenSci! + +# Add additional R libraries beyond Rocker verse which fit our specific project needs. +RUN install2.r --error \ + # Added Packages + PerformanceAnalytics \ + boot \ + devtools \ + dlm \ + dplyr \ + foreign \ + lubridate \ + plotly \ + truncreg \ + ggridges + +## Install CyVerse VICE Depends +RUN apt-get update && apt-get install -y lsb wget apt-transport-https python2.7 python-requests curl supervisor nginx gnupg2 + +RUN wget -qO - https://packages.irods.org/irods-signing-key.asc | apt-key add - \ + && echo "deb [arch=amd64] https://packages.irods.org/apt/ xenial main" > /etc/apt/sources.list.d/renci-irods.list \ + && apt-get update \ + && apt-get install -y irods-icommands + +ADD https://github.com/hairyhenderson/gomplate/releases/download/v2.5.0/gomplate_linux-amd64 /usr/bin/gomplate +RUN chmod a+x /usr/bin/gomplate + +# provide read and write access to Rstudio users for default R library location +RUN chmod -R 777 /usr/local/lib/R/site-library + +ENV PASSWORD "rstudio1" +RUN bash /etc/cont-init.d/userconf + +COPY run.sh /usr/local/bin/run.sh +RUN chmod +x /usr/local/bin/run.sh + +COPY nginx.conf.tmpl /nginx.conf.tmpl +COPY rserver.conf /etc/rstudio/rserver.conf +COPY supervisor-nginx.conf /etc/supervisor/conf.d/nginx.conf +COPY supervisor-rstudio.conf /etc/supervisor/conf.d/rstudio.conf + +ENV REDIRECT_URL "http://localhost/" + +ENTRYPOINT ["/usr/local/bin/run.sh"] diff --git a/3.5.2/README.md b/3.5.2/README.md new file mode 100644 index 0000000..ccedee9 --- /dev/null +++ b/3.5.2/README.md @@ -0,0 +1 @@ +v3.5.2 diff --git a/3.5.2/nginx.conf.tmpl b/3.5.2/nginx.conf.tmpl new file mode 100644 index 0000000..8f52e79 --- /dev/null +++ b/3.5.2/nginx.conf.tmpl @@ -0,0 +1,32 @@ +daemon off; +worker_processes 1; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + server { + listen 80; + + location / { + proxy_pass http://localhost:8787; + proxy_redirect http://localhost:8787 {{.Env.REDIRECT_URL}}; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_read_timeout 20d; + } + } +} diff --git a/3.5.2/rserver.conf b/3.5.2/rserver.conf new file mode 100644 index 0000000..3182bd5 --- /dev/null +++ b/3.5.2/rserver.conf @@ -0,0 +1,4 @@ +# Server Configuration File + +www-address=127.0.0.1 +rsession-which-r=/usr/local/bin/R diff --git a/3.5.2/run.sh b/3.5.2/run.sh new file mode 100644 index 0000000..ec7b0e4 --- /dev/null +++ b/3.5.2/run.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +gomplate -f /nginx.conf.tmpl -o /etc/nginx/nginx.conf +supervisord -c /etc/supervisor/supervisord.conf -n diff --git a/3.5.2/supervisor-nginx.conf b/3.5.2/supervisor-nginx.conf new file mode 100644 index 0000000..dfa1572 --- /dev/null +++ b/3.5.2/supervisor-nginx.conf @@ -0,0 +1,2 @@ +[program:nginx] +command=nginx diff --git a/3.5.2/supervisor-rstudio.conf b/3.5.2/supervisor-rstudio.conf new file mode 100644 index 0000000..b30e77f --- /dev/null +++ b/3.5.2/supervisor-rstudio.conf @@ -0,0 +1,2 @@ +[program:rstudio] +command=/usr/lib/rstudio-server/bin/rserver --server-daemonize 0 diff --git a/3.5.3/Dockerfile b/3.5.3/Dockerfile new file mode 100644 index 0000000..0b3bd37 --- /dev/null +++ b/3.5.3/Dockerfile @@ -0,0 +1,50 @@ +FROM rocker/verse:3.5.3 +MAINTAINER "Tyson Lee Swetnam tswetnam@cyverse.org" +# This image uses the Rocker verse RStudio image - thanks R OpenSci! + +# Add additional R libraries beyond Rocker verse which fit our specific project needs. +RUN install2.r --error \ + # Added Packages + PerformanceAnalytics \ + boot \ + devtools \ + dlm \ + dplyr \ + foreign \ + lubridate \ + plotly \ + truncreg \ + ggridges + +USER root +# Install CyVerse VICE Depends +RUN apt-get update && apt-get install -y lsb wget apt-transport-https python2.7 python-requests curl supervisor nginx gnupg2 + +# install iCommands +RUN wget -qO - https://packages.irods.org/irods-signing-key.asc | apt-key add - \ + && echo "deb [arch=amd64] https://packages.irods.org/apt/ bionic main" > /etc/apt/sources.list.d/renci-irods.list \ + && apt-get update \ + && apt-get install -y irods-icommands \ + && apt-get clean \ + && rm -rf /usr/lib/apt/lists/* + +ADD https://github.com/hairyhenderson/gomplate/releases/download/v2.5.0/gomplate_linux-amd64 /usr/bin/gomplate +RUN chmod a+x /usr/bin/gomplate + +# provide read and write access to Rstudio users for default R library location +RUN chmod -R 777 /usr/local/lib/R/site-library + +ENV PASSWORD "rstudio1" +RUN bash /etc/cont-init.d/userconf + +COPY run.sh /usr/local/bin/run.sh +RUN chmod +x /usr/local/bin/run.sh + +COPY nginx.conf.tmpl /nginx.conf.tmpl +COPY rserver.conf /etc/rstudio/rserver.conf +COPY supervisor-nginx.conf /etc/supervisor/conf.d/nginx.conf +COPY supervisor-rstudio.conf /etc/supervisor/conf.d/rstudio.conf + +ENV REDIRECT_URL "http://localhost/" + +ENTRYPOINT ["/usr/local/bin/run.sh"] diff --git a/3.5.3/README.md b/3.5.3/README.md new file mode 100644 index 0000000..5c2545f --- /dev/null +++ b/3.5.3/README.md @@ -0,0 +1 @@ +v3.5.3 diff --git a/3.5.3/nginx.conf.tmpl b/3.5.3/nginx.conf.tmpl new file mode 100644 index 0000000..8f52e79 --- /dev/null +++ b/3.5.3/nginx.conf.tmpl @@ -0,0 +1,32 @@ +daemon off; +worker_processes 1; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + server { + listen 80; + + location / { + proxy_pass http://localhost:8787; + proxy_redirect http://localhost:8787 {{.Env.REDIRECT_URL}}; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_read_timeout 20d; + } + } +} diff --git a/3.5.3/rserver.conf b/3.5.3/rserver.conf new file mode 100644 index 0000000..3182bd5 --- /dev/null +++ b/3.5.3/rserver.conf @@ -0,0 +1,4 @@ +# Server Configuration File + +www-address=127.0.0.1 +rsession-which-r=/usr/local/bin/R diff --git a/3.5.3/run.sh b/3.5.3/run.sh new file mode 100644 index 0000000..ec7b0e4 --- /dev/null +++ b/3.5.3/run.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +gomplate -f /nginx.conf.tmpl -o /etc/nginx/nginx.conf +supervisord -c /etc/supervisor/supervisord.conf -n diff --git a/3.5.3/supervisor-nginx.conf b/3.5.3/supervisor-nginx.conf new file mode 100644 index 0000000..dfa1572 --- /dev/null +++ b/3.5.3/supervisor-nginx.conf @@ -0,0 +1,2 @@ +[program:nginx] +command=nginx diff --git a/3.5.3/supervisor-rstudio.conf b/3.5.3/supervisor-rstudio.conf new file mode 100644 index 0000000..b30e77f --- /dev/null +++ b/3.5.3/supervisor-rstudio.conf @@ -0,0 +1,2 @@ +[program:rstudio] +command=/usr/lib/rstudio-server/bin/rserver --server-daemonize 0 diff --git a/3.6.0/Dockerfile b/3.6.0/Dockerfile new file mode 100644 index 0000000..6e3c664 --- /dev/null +++ b/3.6.0/Dockerfile @@ -0,0 +1,43 @@ +FROM rocker/verse:3.6.0 +MAINTAINER "Tyson Lee Swetnam tswetnam@cyverse.org" +# This image uses the Rocker verse RStudio image - thanks R OpenSci! + +# Add additional R libraries beyond Rocker verse which fit our specific project needs. +RUN install2.r --error \ + # Added Packages + PerformanceAnalytics \ + boot \ + devtools \ + dlm \ + dplyr \ + foreign \ + lubridate \ + plotly \ + truncreg \ + ggridges + +## Install CyVerse VICE Depends +RUN apt-get update && apt-get install -y lsb wget apt-transport-https python2.7 python-requests curl supervisor nginx gnupg2 + +RUN wget https://files.renci.org/pub/irods/releases/4.1.10/ubuntu14/irods-icommands-4.1.10-ubuntu14-x86_64.deb && dpkg -i *.deb + +ADD https://github.com/hairyhenderson/gomplate/releases/download/v2.5.0/gomplate_linux-amd64 /usr/bin/gomplate +RUN chmod a+x /usr/bin/gomplate + +# provide read and write access to Rstudio users for default R library location +RUN chmod -R 777 /usr/local/lib/R/site-library + +ENV PASSWORD "rstudio1" +RUN bash /etc/cont-init.d/userconf + +COPY run.sh /usr/local/bin/run.sh +RUN chmod +x /usr/local/bin/run.sh + +COPY nginx.conf.tmpl /nginx.conf.tmpl +COPY rserver.conf /etc/rstudio/rserver.conf +COPY supervisor-nginx.conf /etc/supervisor/conf.d/nginx.conf +COPY supervisor-rstudio.conf /etc/supervisor/conf.d/rstudio.conf + +ENV REDIRECT_URL "http://localhost/" + +ENTRYPOINT ["/usr/local/bin/run.sh"] diff --git a/3.6.0/README.md b/3.6.0/README.md new file mode 100644 index 0000000..130165b --- /dev/null +++ b/3.6.0/README.md @@ -0,0 +1 @@ +v3.6.0 diff --git a/3.6.0/nginx.conf.tmpl b/3.6.0/nginx.conf.tmpl new file mode 100644 index 0000000..8f52e79 --- /dev/null +++ b/3.6.0/nginx.conf.tmpl @@ -0,0 +1,32 @@ +daemon off; +worker_processes 1; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + server { + listen 80; + + location / { + proxy_pass http://localhost:8787; + proxy_redirect http://localhost:8787 {{.Env.REDIRECT_URL}}; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_read_timeout 20d; + } + } +} diff --git a/3.6.0/rserver.conf b/3.6.0/rserver.conf new file mode 100644 index 0000000..3182bd5 --- /dev/null +++ b/3.6.0/rserver.conf @@ -0,0 +1,4 @@ +# Server Configuration File + +www-address=127.0.0.1 +rsession-which-r=/usr/local/bin/R diff --git a/3.6.0/run.sh b/3.6.0/run.sh new file mode 100644 index 0000000..ec7b0e4 --- /dev/null +++ b/3.6.0/run.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +gomplate -f /nginx.conf.tmpl -o /etc/nginx/nginx.conf +supervisord -c /etc/supervisor/supervisord.conf -n diff --git a/3.6.0/supervisor-nginx.conf b/3.6.0/supervisor-nginx.conf new file mode 100644 index 0000000..dfa1572 --- /dev/null +++ b/3.6.0/supervisor-nginx.conf @@ -0,0 +1,2 @@ +[program:nginx] +command=nginx diff --git a/3.6.0/supervisor-rstudio.conf b/3.6.0/supervisor-rstudio.conf new file mode 100644 index 0000000..b30e77f --- /dev/null +++ b/3.6.0/supervisor-rstudio.conf @@ -0,0 +1,2 @@ +[program:rstudio] +command=/usr/lib/rstudio-server/bin/rserver --server-daemonize 0 diff --git a/README.md b/README.md index 8606a4f..e1afdf4 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,50 @@ # rstudio-verse -container based on rocker rstudio verse for CyVerse VICE +RStudio with verse dependencies, based on [Rocker RStudio Docker container](https://hub.docker.com/r/rocker/verse) for CyVerse VICE. VICE requires additional configuration files (e.g. `nginx`) to be compatible with our Condor and Kubernetes orchestration. + +[![CircleCI](https://circleci.com/gh/cyverse-vice/shiny-verse.svg?style=svg)](https://circleci.com/gh/cyverse-vice/shiny-verse) [![license](https://img.shields.io/badge/license-GPLv3-blue.svg)](https://opensource.org/licenses/GPL-3.0) [![Project Supported by CyVerse](https://img.shields.io/badge/Supported%20by-CyVerse-blue.svg)](https://www.cyverse.org) [![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3246938.svg)](https://doi.org/10.5281/zenodo.3246938) + + +DockerHub | description | size | metrics | build status +---------------- | ----------------------------------------- | ------ | ------- | -------------- +[![DockerHub](https://img.shields.io/badge/DockerHub-brightgreen.svg?style=popout&logo=Docker)](https://hub.docker.com/r/cyversevice/rstudio-verse) | RStudio w/ verse depends | [![](https://images.microbadger.com/badges/image/cyversevice/rstudio-verse.svg)](https://microbadger.com/images/cyversevice/rstudio-verse) | [![](https://img.shields.io/docker/pulls/cyversevice/rstudio-verse.svg)](https://hub.docker.com/r/cyversevice/rstudio-verse) | [![](https://img.shields.io/docker/automated/cyversevice/rstudio-verse.svg)](https://hub.docker.com/r/cyversevice/rstudio-verse/builds) + +VICE Tools/Apps | tag version | size | metrics | build status +---------------- | ----------------------------------------- | ------ | ------- | -------------- +[![VICE](https://img.shields.io/badge/CyVerse-VICE-blue.svg?style=popout&logo=Docker&color=#1488C6)]()| latest | [![](https://images.microbadger.com/badges/image/cyversevice/rstudio-verse.svg)](https://microbadger.com/images/cyversevice/rstudio-verse) | [![](https://img.shields.io/docker/pulls/cyversevice/rstudio-verse.svg)](https://hub.docker.com/r/cyversevice/rstudio-verse) | [![](https://img.shields.io/docker/automated/cyversevice/rstudio-verse.svg)](https://hub.docker.com/r/cyversevice/rstudio-verse/builds) +[![VICE](https://img.shields.io/badge/CyVerse-VICE-blue.svg?style=popout&logo=Docker&color=#1488C6)]()| v3.5.0 | [![](https://images.microbadger.com/badges/image/cyversevice/rstudio-verse.svg)](https://microbadger.com/images/cyversevice/rstudio-verse) | [![](https://img.shields.io/docker/pulls/cyversevice/rstudio-verse.svg)](https://hub.docker.com/r/cyversevice/rstudio-verse) | [![](https://img.shields.io/docker/automated/cyversevice/rstudio-verse.svg)](https://hub.docker.com/r/cyversevice/rstudio-verse/builds) +[![VICE](https://img.shields.io/badge/CyVerse-VICE-blue.svg?style=popout&logo=Docker&color=#1488C6)]()| v3.5.1 | [![](https://images.microbadger.com/badges/image/cyversevice/rstudio-verse.svg)](https://microbadger.com/images/cyversevice/rstudio-verse) | [![](https://img.shields.io/docker/pulls/cyversevice/rstudio-verse.svg)](https://hub.docker.com/r/cyversevice/rstudio-verse) | [![](https://img.shields.io/docker/automated/cyversevice/rstudio-verse.svg)](https://hub.docker.com/r/cyversevice/rstudio-verse/builds) +[![VICE](https://img.shields.io/badge/CyVerse-VICE-blue.svg?style=popout&logo=Docker&color=#1488C6)]()| v3.5.2 | [![](https://images.microbadger.com/badges/image/cyversevice/rstudio-verse.svg)](https://microbadger.com/images/cyversevice/rstudio-verse) | [![](https://img.shields.io/docker/pulls/cyversevice/rstudio-verse.svg)](https://hub.docker.com/r/cyversevice/rstudio-verse) | [![](https://img.shields.io/docker/automated/cyversevice/rstudio-verse.svg)](https://hub.docker.com/r/cyversevice/rstudio-verse/builds) +[![VICE](https://img.shields.io/badge/CyVerse-VICE-blue.svg?style=popout&logo=Docker&color=#1488C6)]()| v3.5.3 | [![](https://images.microbadger.com/badges/image/cyversevice/rstudio-verse.svg)](https://microbadger.com/images/cyversevice/rstudio-verse) | [![](https://img.shields.io/docker/pulls/cyversevice/rstudio-verse.svg)](https://hub.docker.com/r/cyversevice/rstudio-verse) | [![](https://img.shields.io/docker/automated/cyversevice/rstudio-verse.svg)](https://hub.docker.com/r/cyversevice/rstudio-verse/builds) +[![VICE](https://img.shields.io/badge/CyVerse-VICE-blue.svg?style=popout&logo=Docker&color=#1488C6)]()| v3.6.0 | [![](https://images.microbadger.com/badges/image/cyversevice/rstudio-verse.svg)](https://microbadger.com/images/cyversevice/rstudio-verse) | [![](https://img.shields.io/docker/pulls/cyversevice/rstudio-verse.svg)](https://hub.docker.com/r/cyversevice/rstudio-verse) | [![](https://img.shields.io/docker/automated/cyversevice/rstudio-verse.svg)](https://hub.docker.com/r/cyversevice/rstudio-verse/builds) + +# Instructions + +## Run this Docker locally or on a Virtual Machine + +To run these containers, you must first pull them from DockerHub + +``` +docker pull cyversevice/rstudio-verse:latest +``` + +``` +docker run -it --rm -v /$HOME:/app --workdir /app -p 8787:80 -e REDIRECT_URL=http://localhost:8787 cyversevice/rstudio-verse:latest +``` + +The default username is `rstudio` and password is `rstudio1`. To reset the password, add the flag `-e PASSWORD=` in the `docker run` statement. + +## Build your own Docker container and deploy on CyVerse VICE + +This container is intended to run on the CyVerse data science workbench, called [VICE](https://cyverse-visual-interactive-computing-environment.readthedocs-hosted.com/en/latest/index.html). + +Unless you plan on making changes to this container, you should just use the existing launch button above. + +###### Developer notes + +To build your own container with a Dockerfile and additional dependencies, pull the pre-built image from DockerHub: + +``` +FROM cyversevice/rstudio-verse:latest +``` + +Follow the instructions in the [VICE manual for integrating your own tools and apps](https://cyverse-visual-interactive-computing-environment.readthedocs-hosted.com/en/latest/developer_guide/building.html). diff --git a/latest/Dockerfile b/latest/Dockerfile new file mode 100644 index 0000000..893d08d --- /dev/null +++ b/latest/Dockerfile @@ -0,0 +1,43 @@ +FROM rocker/verse:latest +MAINTAINER "Tyson Lee Swetnam tswetnam@cyverse.org" +# This image uses the Rocker verse RStudio image - thanks R OpenSci! + +# Add additional R libraries beyond Rocker verse which fit our specific project needs. +RUN install2.r --error \ + # Added Packages + PerformanceAnalytics \ + boot \ + devtools \ + dlm \ + dplyr \ + foreign \ + lubridate \ + plotly \ + truncreg \ + ggridges + +## Install CyVerse VICE Depends +RUN apt-get update && apt-get install -y lsb wget apt-transport-https python2.7 python-requests curl supervisor nginx gnupg2 + +RUN wget https://files.renci.org/pub/irods/releases/4.1.10/ubuntu14/irods-icommands-4.1.10-ubuntu14-x86_64.deb && dpkg -i *.deb + +ADD https://github.com/hairyhenderson/gomplate/releases/download/v2.5.0/gomplate_linux-amd64 /usr/bin/gomplate +RUN chmod a+x /usr/bin/gomplate + +# provide read and write access to Rstudio users for default R library location +RUN chmod -R 777 /usr/local/lib/R/site-library + +ENV PASSWORD "rstudio1" +RUN bash /etc/cont-init.d/userconf + +COPY run.sh /usr/local/bin/run.sh +RUN chmod +x /usr/local/bin/run.sh + +COPY nginx.conf.tmpl /nginx.conf.tmpl +COPY rserver.conf /etc/rstudio/rserver.conf +COPY supervisor-nginx.conf /etc/supervisor/conf.d/nginx.conf +COPY supervisor-rstudio.conf /etc/supervisor/conf.d/rstudio.conf + +ENV REDIRECT_URL "http://localhost/" + +ENTRYPOINT ["/usr/local/bin/run.sh"] diff --git a/latest/README.md b/latest/README.md new file mode 100644 index 0000000..2b3db6c --- /dev/null +++ b/latest/README.md @@ -0,0 +1 @@ +v latest diff --git a/latest/nginx.conf.tmpl b/latest/nginx.conf.tmpl new file mode 100644 index 0000000..8f52e79 --- /dev/null +++ b/latest/nginx.conf.tmpl @@ -0,0 +1,32 @@ +daemon off; +worker_processes 1; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + server { + listen 80; + + location / { + proxy_pass http://localhost:8787; + proxy_redirect http://localhost:8787 {{.Env.REDIRECT_URL}}; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_read_timeout 20d; + } + } +} diff --git a/latest/rserver.conf b/latest/rserver.conf new file mode 100644 index 0000000..3182bd5 --- /dev/null +++ b/latest/rserver.conf @@ -0,0 +1,4 @@ +# Server Configuration File + +www-address=127.0.0.1 +rsession-which-r=/usr/local/bin/R diff --git a/latest/run.sh b/latest/run.sh new file mode 100644 index 0000000..ec7b0e4 --- /dev/null +++ b/latest/run.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +gomplate -f /nginx.conf.tmpl -o /etc/nginx/nginx.conf +supervisord -c /etc/supervisor/supervisord.conf -n diff --git a/latest/supervisor-nginx.conf b/latest/supervisor-nginx.conf new file mode 100644 index 0000000..dfa1572 --- /dev/null +++ b/latest/supervisor-nginx.conf @@ -0,0 +1,2 @@ +[program:nginx] +command=nginx diff --git a/latest/supervisor-rstudio.conf b/latest/supervisor-rstudio.conf new file mode 100644 index 0000000..b30e77f --- /dev/null +++ b/latest/supervisor-rstudio.conf @@ -0,0 +1,2 @@ +[program:rstudio] +command=/usr/lib/rstudio-server/bin/rserver --server-daemonize 0