Skip to content

Commit

Permalink
build: simplify/clean-up Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
gladkia committed Feb 13, 2024
1 parent 09768d4 commit f720fcd
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,35 +1,21 @@
ARG BASE_IMAGE=bioconductor/bioconductor_docker:devel
FROM ${BASE_IMAGE}

# ------ Be aware that any changes in following may cause issue with RPlatform and CBS

LABEL MAINTAINER="[email protected]"
LABEL NAME=gdrutils
LABEL GENERATE_SINGULARITY_IMAGE=false
LABEL production=false
LABEL VERSION=0.0.0.9100
#LABEL CACHE_IMAGE="registry.rplatform.org:5000/githubroche/gdrplatform/gdrutils"

# temporary fix
# GitHub token for downloading private dependencies
# Need to be defined after FROM as it flushes ARGs
ARG GITHUB_TOKEN

COPY ./ /tmp/gDRutils/
COPY .git/ /tmp/gDRutils/.git/
RUN ls -ltra /tmp/gDRutils/
RUN ls -ltra /tmp/gDRutils/.git/

#================= Install dependencies
#RUN apt-get update && apt-get -y install git
RUN mkdir -p /mnt/vol
COPY rplatform/dependencies.yaml rplatform/.github_access_token.txt* /mnt/vol
RUN echo "$GITHUB_TOKEN" >> /mnt/vol/.github_access_token.txt
RUN Rscript -e 'BiocManager::install(c("gDRstyle", "gDRtestData", "gDRutils", "BiocStyle", "qs"))'
RUN Rscript -e "gDRstyle::installAllDeps()"

#================= Check & build package
COPY ./ /tmp/gDRutils/
RUN Rscript -e "gDRstyle::installLocalPackage('/tmp/gDRutils')"

#================= Clean up
#RUN sudo rm -rf /mnt/vol/* /tmp/gDRutils/
RUN sudo rm -rf /mnt/vol/* /tmp/gDRutils/

0 comments on commit f720fcd

Please sign in to comment.