基于ubuntu构建R-4.0.0版本docker镜像

  1. Dockerfile
from ubuntu:latest
WORKDIR /root/
RUN apt update && apt install wget -y && \
    wget http://mirrors.ustc.edu.cn/CRAN/src/base/R-4/R-4.0.0.tar.gz && \
    tar -zxf R-4.0.0.tar.gz && \
    apt autoremove && apt clean

WORKDIR /root/R-4.0.0
RUN apt update && \
    apt install g++ gfortran libreadline-dev zlib1g-dev libbz2-dev liblzma-dev libpcre2-dev libcurl4-openssl-dev make -y && \
    ./configure --with-x=no && \
    make && \
    make install && \
    apt autoremove && apt clean
  1. 构建
docker build -t username/test:v0.1.0 .

注意 . 代表docker上下文;必不可少

猜你喜欢

转载自blog.csdn.net/nixiang_888/article/details/118552029