rocker-org / rocker-versioned2

Run current & prior versions of R using docker. rocker/r-ver, rocker/rstudio, rocker/shiny, rocker/tidyverse, and so on.
https://rocker-project.org
GNU General Public License v2.0
390 stars 163 forks source link

Did repository reorganization delete a bunch of images for older versions of R? #800

Closed wetlandscapes closed 2 months ago

wetlandscapes commented 2 months ago

I'm trying to rebuild an image and noticed that I can no longer pull that version of R (4.2.0). Looking at the commit history, it looks like all the images for older versions (>=4.0.0) are available up until commit 07e82a0 by @eitsupi, which is referenced in #782. Now if I look in the dockerfiles/ directory there are only references to the R versions 4.2.3, 4.3.3, and 4.4.0.

I'm guessing this was not an intend outcome from the project reorganization, so wanted to it out to you all.

eitsupi commented 2 months ago

This is a completely intentional change. The new build script will remove the old Dockerfile. https://github.com/rocker-org/rocker-versioned2/blob/a2af4d6e9b143452c641f1decacfd124aec082ab/build/scripts/clean-files.R#L23-L25

If you need an older Dockerfile, I recommend checking out the commit you need and using it.

eitsupi commented 2 months ago

By the way, why do you want to rebuild the image?

wetlandscapes commented 2 months ago

Apologies. I need to be more precise. I meant pulling the images. Either way, the image I relied on is no longer there (and a bunch of documentation on the rocker website is no longer up to date, because they reference R versions that are seemingly no longer supported).

I'm using the images for reproducible science. Once I start a manuscript I don't update my R version because I want the analysis to be as reproducible as possible, which means not switching R versions, packages, etc during the life of the project so I can be more confident I didn't inadvertently make the code unrunnable due to some change in an underlying version of R or package I was using. My impression was that was an underlying principle of this project -- reproducibility across minor (or even patch) version updates of R.

Also seems a bit inconsistent to only have images of some versions of R. Does that mean you all aren't going to build images for the latest minor versions of R? How do you choose?

I guess I'm just kind of baffled by this seemingly random (from my perspective) change in how all this is run.

That said, I DO very much appreciate y'all's hard work on this. It's changed the way I manage science projects, for the better. Just kind of frustrating that I'm near the end of writing a manuscript and these changes break my environment, meaning I may need to spend days or weeks re-running stuff to ensure my analysis generates the same ouptuts with a different version of R.

eitsupi commented 2 months ago

Sorry, but I am not understanding what you are trying to say. Is "pulling the images" you said referring to something like the docker pull command?

I don't think the availability of an image on a container registry like DockerHub has anything to do with whether the Dockerfile on GitHub that pushed the image has been removed. In other words, your failure to pull the image has nothing to do with the fact that I deleted the Dockerfile.

$ date
Thu May  2 07:51:10 JST 2024
$ docker run --rm -it rocker/r-ver:4.2.0 R --version
Unable to find image 'rocker/r-ver:4.2.0' locally
4.2.0: Pulling from rocker/r-ver
17d0386c2fff: Pull complete
5b28f130c170: Pull complete
1847e2a2f79e: Pull complete
f9408f27ba52: Pull complete
c54999510c88: Pull complete
Digest: sha256:53ae350adb0d7807533bc27026923ef1a02bcd9b15e7df016a48b9ca9a003b3a
Status: Downloaded newer image for rocker/r-ver:4.2.0
R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
https://www.gnu.org/licenses/.

The image I just pulled for testing is an exact match to the following image listed in the wiki of this repository. https://github.com/rocker-org/rocker-versioned2/wiki/r-ver_528b3dd75631

wetlandscapes commented 2 months ago

🤦 This may be a firewall issue on my end (which my org controls) and the randomness that my stuff broke when the dockerfiles here were deleted (and my conflation of the two things). I'll keep digging, but if you don't here back from me, that was it.

On the upside, I did learn something: I'd previously assumed there was a closer relationship between the dockerfiles in this repo and the images on docker hub, but apparently that's not that works.

Thanks for your quick and patient response!

eitsupi commented 2 months ago

I'd previously assumed there was a closer relationship between the dockerfiles in this repo and the images on docker hub, but apparently that's not that works.

That is correct. The user needs to find out how the image that actually resides on the container registry was built.

Since images built from this repository always have a label (org.opencontainers.image.revision) that records the Git commit hash and the build is completely performed by GitHub Actions, so we can track which source code the image was built from by examining the image.

https://github.com/rocker-org/rocker-versioned2/blob/24a64fa4f9e96f1743f92d53f06646ca0307fbdf/Makefile#L49