I am trying to install R in an Ubuntu docker image. I am able to successfully do so using this line:
RUN apt-get update && apt-get install -y r-base
but it is installing r 3.2.3. I need a newer version (3.5.2). Does anyone know how to specify which version to download?
Sure thing:
FROM ubuntu:18.10
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get -y install --no-install-recommends --no-install-suggests \
ca-certificates software-properties-common gnupg2 gnupg1 \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 \
&& add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/' \
&& apt-get install r-base
Taken from here: https://cran.r-project.org/bin/linux/ubuntu/README.html
And here: https://github.com/noisebrain/Dockerfiles/blob/0668df74b27f514dab19a7afae6715328de72980/Rstudio-server-aib/rstudio-server-aib.dockerfile
root@100d1cda7377:/# R
R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With