我正在尝试使用docker容器内的二进制文件安装docker软件包。受此帖子启发:How to speed up R packages installation in docker
现在所有要安装的cran软件包都存储在文件requirements-bin.txt中
错误:
E: Unable to locate package r-cran-plumber
E: Unable to locate package r-cran-tolerance
Docker文件:
FROM rocker/r-apt:bionic
WORKDIR /app
RUN apt-get update && \
apt-get install -y libxml2-dev
# Install binaries (see https://datawookie.netlify.com/blog/2019/01/docker-images-for-r-r-base-versus-r-apt/)
COPY ./requirements-bin.txt .
RUN cat requirements-bin.txt | xargs apt-get install -y -qq
# Clean up package registry
RUN rm -rf /var/lib/apt/lists/*
COPY ./src /app
EXPOSE 5000
CMD ["Rscript", "Server.R"]
requirements-bin.txt
r-cran-plumber
r-cran-tolerance