在Linux中用docker安装r-base软件包

张开发
2026/4/11 1:08:31 15 分钟阅读

分享文章

在Linux中用docker安装r-base软件包
拉取镜像aaakylin-pc:~/par$ sudo docker pull docker.1ms.run/r-base 输入密码 Using default tag: latest latest: Pulling from r-base 5ceadc30f5c5: Pull complete 06a5a115834f: Pull complete cf0a86b26e17: Pull complete 270e6fb5e815: Pull complete efda2a3a164d: Pull complete a221563de127: Pull complete 051e7bdadff2: Download complete d00dde9f504e: Download complete Digest: sha256:ce88ddcdd15d9901a55439de10791cae3598644c2221332dc5b90dc6ec837084 Status: Downloaded newer image for docker.1ms.run/r-base:latest docker.1ms.run/r-base:latest运行并登录容器注意容器名不能用单个字母aaakylin-pc:~/par$ sudo docker run -itd -v /home/aaa/par:/par --network host --name r docker.1ms.run/r-base docker: Error response from daemon: Invalid container name (r), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed Run docker run --help for more information aaakylin-pc:~/par$ sudo docker run -itd -v /home/aaa/par:/par --network host --name rbase docker.1ms.run/r-base f4716301d714fd7a3981cebb4be98f3ec2bdda72e41dcb0a7c922258d79fc907 aaakylin-pc:~/par$ sudo docker exec -it rbase bash rootkylin-pc:/# cd /par rootkylin-pc:/par# mkdir work rootkylin-pc:/par# cd work rootkylin-pc:/par/work# R R version 4.5.3 (2026-03-11) -- Reassured Reassurer Copyright (C) 2026 The R Foundation for Statistical Computing Platform: aarch64-unknown-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type license() or licence() for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type contributors() for more information and citation() on how to cite R or R packages in publications. Type demo() for some demos, help() for on-line help, or help.start() for an HTML browser interface to help. Type q() to quit R.测试R语句 ?solve x - c(10.4, 5.6, 3.1, 6.4, 21.7) 1/x [1] 0.09615385 0.17857143 0.32258065 0.15625000 0.04608295 sqrt(-170i) [1] 04.123106i

更多文章