将特定版本的R添加到Docker容器 [英] Add a particular version of R to a docker container
本文介绍了将特定版本的R添加到Docker容器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在Ubuntu docker映像中安装R.我可以使用此行成功完成此操作:
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
但它正在安装r 3.2.3.我需要更新的版本(3.5.2).有谁知道如何指定要下载的版本?
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?
推荐答案
确定的事情:
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
来自此处: https://cran.r-project.org/bin/linux/ubuntu/README.html
root@100d1cda7377:/# R
R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"
这篇关于将特定版本的R添加到Docker容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文