I am attempting to utilize the rocker/r-apt image which enables R binary installs.
My 72 Minute Docker Build using the r-base image could use some help…
My file looks like this.
FROM container.registry/rocker/r-apt:bionic
RUN apt-get update
Couple of notes. My company uses an internal registry, so i’ve downloaded the image from
https://hub.docker.com/r/rocker/r-apt
and pushed it to my local container registry.
When I try and build the Docker container it gives me this error.
UPDATE – Full Error message
/deb.debian.org/debian testing InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138
I can post a more detailed error message when the internet on my other computer returns.
I realize now that bionic is the Ubuntu distro. r-base uses a debian base from what I can tell.
My big question..what am I doing wrong to get this rocker/r-apt image to run correctly and still allow me to use apt-get to install a number of things, include the cran-r packages that its supposed to enable.
I am following this post by datawookie.
https://datawookie.netlify.app/blog/2019/01/docker-images-for-r-r-base-versus-r-apt/
UPDATE
My new big question… should i be pointing at deb.debian.org/debian
for apt-get?
2
Answers
Success!!! So the R-Ubuntu 20.04 appears to be working like a charm. My outcome of decreasing the build time of my R application has worked.
72 Minutes is now 4 Minutes
This is important because our applications run in CI/CD pipelines and so a 72 minute build is extremely annoying. Not to mention consumes lots of resources to compile code.
It looks like all my issues were related to my organizations Nexus Repository. Once we downloaded the R-Ubuntu, we had to rebuild it from the GIT Repo to utilize our internal Ubuntu Image. That fixed 1 problem.
Then I had to import the Michael Rutter Repo as a source and update that to utilize the internal repository.
The one issue that might not be apparent is that the DockerFile has to have the apt-get update and installs in the correct order. I do not recall if the source image had all this, but I'll post the order here.
So once all that was setup it worked like magic.
I would suggest to use
rocker/r-ubuntu
instead ofrocker/r-apt
(which predates it). I am the man behind the curtain for both.Within Rocker we have containers based on Debian, and containers based on Ubuntu, and containers based on Debian now that will likely be based on Ubuntu in the future. In short, “it’s complicated” but that is in part … because we have so darn many containers already.
The source for background information is still our R Journal paper (shortcut to pdf).