After image succesfully created the library i installed is not in the immage

Hi, my first attempt to build an immage.

Dockerfile

FROM rocker/r-ver:4.3.1

# Install system libraries that Seurat and its dependencies need
RUN apt-get update && apt-get install -y \
    libcurl4-openssl-dev \
    libssl-dev \
    libxml2-dev \
    libpng-dev \
    libjpeg-dev \
    libfontconfig1-dev \
    libcairo2-dev \
    libxt-dev \
    pkg-config \
    && rm -rf /var/lib/apt/lists/*

# Set CRAN mirror
RUN echo 'options(repos = c(CRAN = "https://cloud.r-project.org"))' >> /usr/local/lib/R/etc/Rprofile.site

# First update Matrix to a new enough version
RUN R -q -e "install.packages('Matrix', dependencies = TRUE)"

# Then install Seurat
RUN R -q -e "install.packages('Seurat', dependencies = TRUE)"

all the process seems going well. image is created but when i enter the image

      docker run -it image R
       >library (Seurat)

the library is not there.

suggestions?

Start a container from FROM rocker/r-ver:4.3.1 with an interactive shell and run the commands manually. You will see if it has the same result. I don’t remember the parameters of R, but I remember the package installation did not stop the image build process even when the instruction failed. So check the image build logs as well. You can pass `–progress plain

Another issue could be if R requires some env variables to load the libraries properly. I just quickly wrote this message, I would need to google it to be sure, but I assume you know R better than I.`

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.