diff --git a/docker/Dockerfile_dsOmics b/docker/Dockerfile_dsOmics index b0ffa5c..f3d44e5 100644 --- a/docker/Dockerfile_dsOmics +++ b/docker/Dockerfile_dsOmics @@ -4,7 +4,7 @@ # 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 @@ -12,6 +12,5 @@ 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 diff --git a/docker/Makefile b/docker/Makefile index 9e42ad7..b667407 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -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) .