Skip to content

Commit

Permalink
One image, multiple tags and R upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
ymarcon committed Nov 10, 2024
1 parent aa6fb35 commit 9991b05
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
7 changes: 3 additions & 4 deletions docker/Dockerfile_dsOmics
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
# Based on https://github.com/datashield/docker-rock
#

FROM datashield/rock-base:6.3-R4.3
FROM datashield/rock-base:6.3-R4.4

ENV DSOMICS_VERSION v1.0.18-4

ENV ROCK_LIB /var/lib/rock/R/library

# Install new R packages
RUN Rscript -e "BiocManager::install(c('Biobase', 'SNPRelate', 'GENESIS', 'GWASTools', 'GenomicRanges', 'SummarizedExperiment', 'DESeq2', 'edgeR', 'MEAL'), update = FALSE, ask = FALSE, lib = '$ROCK_LIB')" \
&& Rscript -e "remotes::install_github('isglobal-brge/dsOmics', ref = '$DSOMICS_VERSION', upgrade = FALSE, lib = '$ROCK_LIB')"

RUN chown -R rock $ROCK_LIB
&& Rscript -e "remotes::install_github('isglobal-brge/dsOmics', ref = '$DSOMICS_VERSION', upgrade = FALSE, lib = '$ROCK_LIB')" \
&& chown -R rock $ROCK_LIB
18 changes: 16 additions & 2 deletions docker/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
# Variables
DOCKERFILE_NAME := Dockerfile_dsOmics
IMAGE_NAME := brgelab/rock-omics
TAG := latest
DSOMICS_VERSION := 1.0.18
R_VERSION := 4.4

# Build and push the image to Docker Hub
all: build-all push-all

build-all:
docker build -f $(DOCKERFILE_NAME) --no-cache=true --pull -t="$(IMAGE_NAME):$(DSOMICS_VERSION)-R$(R_VERSION)" . && \
docker tag $(IMAGE_NAME):$(DSOMICS_VERSION)-R$(R_VERSION) $(IMAGE_NAME):$(DSOMICS_VERSION) && \
docker tag $(IMAGE_NAME):$(DSOMICS_VERSION)-R$(R_VERSION) $(IMAGE_NAME):latest

push-all:
docker image push $(IMAGE_NAME):$(DSOMICS_VERSION)-R$(R_VERSION) && \
docker image push $(IMAGE_NAME):$(DSOMICS_VERSION) && \
docker image push $(IMAGE_NAME):latest

build:
docker build -f $(DOCKERFILE_NAME) -t $(IMAGE_NAME):$(TAG) .
docker build --pull -f $(DOCKERFILE_NAME) -t $(IMAGE_NAME):$(DSOMICS_VERSION)-R$(R_VERSION) .

0 comments on commit 9991b05

Please sign in to comment.