# hash:sha256:f8e7d10e4055b205880aad98bab5ae7e9e53b28d0cbc76bc30c345f6d5432563
FROM registry.codeocean.com/codeocean/r-studio:1.4.1106-r4.0.5-ubuntu18.04

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        cmake=3.10.2-1ubuntu2.18.04.2 \
        libnlopt-dev=2.4.2+dfsg-4 \
        pkg-config=0.29.1-0ubuntu2 \
    && rm -rf /var/lib/apt/lists/*

RUN Rscript -e 'remotes::install_version("AER", "1.2-9")' \
    && Rscript -e 'remotes::install_version("dplyr", "1.0.8")' \
    && Rscript -e 'remotes::install_version("ggplot2", "3.3.6")' \
    && Rscript -e 'remotes::install_version("gridExtra", "2.3")' \
    && Rscript -e 'remotes::install_version("hdm", "0.3.1")' \
    && Rscript -e 'remotes::install_version("randomForest", "4.7-1")' \
    && Rscript -e 'remotes::install_version("sm", "2.2-5.7")'
