我想安装一些特定版本的 R 包。根据文件 littler 识别可安装的源文件。所以我认为这可能有效:
FROM r-base:latest
RUN apt-get update \
&& install.r --error digest_0.6.8.tar.gz
输出如下所示,至少在这里与我的假设不矛盾
[+] Building 9.3s (6/6) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 138B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/r-base:latest 0.3s
=> CACHED [1/2] FROM docker.io/library/r-base:latest@sha256:c3808f786a44ef1b2ed727166ac3daed1d47b1894c6858869a2bb6f97b7a1da9 0.0s
=> [2/2] RUN apt-get update && install.r --error digest_0.6.8.tar.gz 8.7s
=> exporting to image 0.2s
=> => exporting layers 0.2s
=> => writing image sha256:a8781141095c3edef0618ebf1b2be8de435cdc62eacae6c617f2b512c7df68f5 0.0s
=> => naming to docker.io/library/test_install_r
但是,在运行时digest
未安装容器。
使用 install2.r 时
FROM r-base:latest
RUN apt-get update \
&& install2.r --error digest_0.6.8.tar.gz
哪里抛出错误:
=> ERROR [2/2] RUN apt-get update && install2.r --error digest_0.6.8.tar.gz 8.3s
------
> [2/2] RUN apt-get update && install2.r --error digest_0.6.8.tar.gz:
#5 0.440 Get:1 http://deb.debian.org/debian testing InRelease [129 kB]
#5 0.537 Ign:2 https://eddelbuettel.github.io/ppaR400 ./ InRelease
#5 0.669 Get:3 http://deb.debian.org/debian experimental InRelease [75.4 kB]
#5 0.711 Get:4 https://eddelbuettel.github.io/ppaR400 ./ Release [1,204 B]
#5 0.822 Get:5 http://cdn-fastly.deb.debian.org/debian sid InRelease [165 kB]
#5 0.826 Get:6 http://deb.debian.org/debian testing/main amd64 Packages [8,260 kB]
#5 0.837 Ign:7 https://eddelbuettel.github.io/ppaR400 ./ Release.gpg
#5 0.980 Get:8 https://eddelbuettel.github.io/ppaR400 ./ Packages [26.4 kB]
#5 1.144 Get:9 http://cdn-fastly.deb.debian.org/debian sid/main amd64 Packages [8,881 kB]
#5 3.522 Get:10 http://deb.debian.org/debian experimental/main amd64 Packages [392 kB]
#5 5.783 Fetched 17.9 MB in 5s (3,289 kB/s)
#5 5.783 Reading package lists...
#5 8.186 Error: package ‘digest_0.6.8.tar.gz’ is not available for this version of R
#5 8.186
#5 8.186 A version of this package for your version of R might be available elsewhere,
#5 8.186 see the ideas at
#5 8.186 https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
#5 8.186 In addition: Warning message:
#5 8.186 package ‘digest_0.6.8.tar.gz’ is not available for this version of R
#5 8.186
#5 8.186 A version of this package for your version of R might be available elsewhere,
#5 8.186 see the ideas at
#5 8.186 https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
我想我在这里遗漏了一些东西,并感谢任何建议!