This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Docker for Bioconductor Packages

Hello!

I am trying to use Docker to containerize an RStudio Environment with Bioconductor Packages VariantAnnotation and trio. It is not currently working- I was wondering if anyone had any suggestions?

Here is my Dockerfile:

FROM rocker/rstudio

RUN apt-get update && \
    apt-get install -y \
    libxml2-dev \
    libssl-dev \
    libcurl4-openssl-dev

RUN R -e "install.packages('data.table')"

RUN R -e "if (!requireNamespace('BiocManager', quietly = TRUE)) install.packages('BiocManager')"
RUN R -e 'BiocManager::install("VariantAnnotation")'
RUN R -e 'BiocManager::install("trio")'

CMD ["R"]

Thank you!

docker bioconductor

What's not working and what is the verbatim error message if any?

For Bioconductor (or R in general) I recommend the Bioconductor Docker image, current one is bioconductor/bioconductor_docker:RELEASE_3_18. It's Rocker with lots of dependencies on top so you can install every Bioconductor package out of the box. As for your problem I would probably remove CMD ["R"] since Rocker already has an entrypoint which is the rstudio-server session. Read the documentation on how to launch it. I personally would run R scripts via Rscript. For more advise show what "does not work".

https://www.bioconductor.org/help/docker/

Hello, I had updated the code to include

FROM bioconductor/bioconductor_docker:RELEASE_3_18

RUN apt-get update \

## Install the python package tensorflow
&& pip install tensorflow       \
## Remove packages in '/var/cache/' and 'var/lib'
## to remove side-effects of apt-get update
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

This is the error I am getting still: "exec /usr/bin/sh: exec format error"

What does this mean and how can I fix it?

Thank you!

what command do you run?

I am running CMD ["Rscript"]

I think it might have to do with RUN apt-get, might need RStudio Specific packages in there.

0 answers

No answers yet.

Log in to answer this question.