Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The base image is built with the create-builder-image.sh script.
ARG BASE_IMAGE=containers.renci.org/helxplatform/rstudio-base:focal-amd64
FROM $BASE_IMAGE as builder

Check warning on line 3 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-push-image

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

# Install a nodejs version that is newer than the one included in LTS version of Ubuntu.
# https://github.com/nodesource/distributions
Expand All @@ -21,7 +21,7 @@

# Drop build layer and copy the rstudio-server installed files to another
# layer.
FROM ubuntu:focal as base

Check warning on line 24 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-push-image

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

COPY --from=builder /usr/local/lib/rstudio-server /usr/local/lib/rstudio-server

Expand Down Expand Up @@ -53,8 +53,8 @@
RUN apt-get install -y libc6 libclang-dev libpq5 libsqlite3-0 libssl-dev \
lsb-release psmisc sudo

# Copy R script to install R packages.
COPY root/root/install-r-package.R /root/
# Copy R scripts to install R packages.
COPY root/root/install-r-package.R root/root/install-bioc-package.R /root/

# Install extra packages for ORDR-D.
# r-project packages available:
Expand Down Expand Up @@ -84,7 +84,18 @@
&& Rscript /root/install-r-package.R 'RPostgreSQL' \
&& Rscript /root/install-r-package.R 'tableone' \
&& Rscript /root/install-r-package.R 'tidyverse' \
&& Rscript /root/install-r-package.R 'xgboost'
&& Rscript /root/install-r-package.R 'xgboost' \
&& Rscript /root/install-r-package.R 'BiocManager' \
&& Rscript /root/install-r-package.R 'circlize' \
&& Rscript /root/install-r-package.R 'cluster' \
&& Rscript /root/install-r-package.R 'DescTools' \
&& Rscript /root/install-r-package.R 'hdnom' \
&& Rscript /root/install-r-package.R 'patchwork' \
&& Rscript /root/install-r-package.R 'readxl' \
&& Rscript /root/install-r-package.R 'rms' \
&& Rscript /root/install-r-package.R 'survival' \
&& Rscript /root/install-r-package.R 'survminer' \
&& Rscript /root/install-bioc-package.R 'ComplexHeatmap'

# Copy files used for rstudio configuration and starting rstudio-server.
COPY root /
Expand All @@ -111,4 +122,4 @@

WORKDIR /
USER $END_USER_USERNAME
CMD /start.sh

Check warning on line 125 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-push-image

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/
2 changes: 1 addition & 1 deletion config.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ IMAGE=focal

APP_NAME=rstudio-server
IMAGE_REPO=containers.renci.org/helxplatform
VERSION=v0.2.3
VERSION=v0.2.4

# These variables used when running the container.
CONTAINER_PORT=8787
Expand Down
7 changes: 7 additions & 0 deletions root/root/install-bioc-package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env Rscript

args <- commandArgs(trailingOnly = TRUE)
package <- args[1]

BiocManager::install(package, dependencies=TRUE, update=FALSE, ask=FALSE)
stopifnot(package %in% installed.packages()[,'Package'])
Loading