Search code examples
rdockerfiledevtools

Unable to install archive version of WeibullR package on docker


I have created the following dockerfile to deploy an application

# get shiny serves plus tidyverse packages image
FROM rocker/r-ver:latest

RUN apt-get update && apt-get install -y \
sudo \
pandoc \
pandoc-citeproc \
libcurl4-gnutls-dev \
libcairo2-dev \
libxt-dev \
libssl-dev \
libxml2-dev \
libssh2-1-dev 

 RUN R -e "install.packages('devtools')"

 RUN R -e "require(devtools)"

RUN R -e 'install_version("WeibullR", version = "1.1.10", repos="http://cran.us.r- 
project.org")'

The build fails. I request someone to guide me. I am unable to get it to work


Solution

  • I have found a solution that works. Am posting the same so that someone could consider it a solution

    get shiny server plus tidyverse packages image
    FROM rocker/r-ver:latest
    FROM rocker/shiny-verse:latest
    
    RUN apt-get update && apt-get install -y \
    sudo \
    pandoc \
    pandoc-citeproc \
    libcurl4-gnutls-dev \
    libcairo2-dev \
    libxt-dev \
    libssl-dev \
    libxml2-dev \
    libssh2-1-dev 
    
    RUN R -e "install.packages('devtools')"
    
    RUN R -e "require(devtools)"
    
    RUN R -e 'install_version("WeibullR", version = "1.1.10", 
    repos="http://cran.us.r- 
    project.org")'
    

    This works neatly.