Reputation: 2717
I'm attempting to build a small R container that installs some packages for code I want to run on in docker containers on Google Compute Engine.
I need to install (e.g.) jsonlite
In my dockerfile is a line to do this:
RUN Rscript -e 'install.packages("jsonlite", repo="http://cran.ma.imperial.ac.uk/")'
However, when I attempt to build the dockerfile containing this line on compute engine, it doesn't install. The source tarball is downloaded to /tmp/Rsomething but the package isn't actually installed. I have to run R CMD INSTALL
manually on the tarball, and the the installation is successful.
When I run docker build .
on the same dockerfile locally, everything works, and packages are correctly installed.
AFAIK, this wasn't happening 2-3 months ago - I had a successful cached build a while ago.
What is the problem here? Is R, or docker, compute engine or some mixture of all three?
My current workaround is to add
RUN find /tmp/ -name '*.tar.gz' -exec R CMD INSTALL '{}' \;
to the end of the docker file, but if tarballs are not found in the right order, then things seem to be installed before their dependencies (sometimes), which then doesn't work.
Upvotes: 1
Views: 695
Reputation: 2717
The problem was that the docker instance had itself into some poor state. After seeing some unexpected error messages (something about http:///var/run/...
) I rebooted the host, and after that everything proceeded as expected.
Upvotes: 1