Reposync --releasever doesn't work in a rocky container

Just discovered this today, as reposync merrily downloaded everything 9.6 in to my 9.5 folder, meaning that I’ll have to rsync everything 9.5 from vault again!

I’m guessing this is because on https://hub.docker.com/_/rockylinux it says “The rockylinux:latest tag is intentionally missing. Please choose a major version (currently 8 or 9) tag.”

This does work for Alma and RedHat, so not sure why Rocky is different?

See this link, where I’ve mentioned before about the docker library link problem:

Therefore for pulling images, rather than attempting to use the shortcut (library) link, just do:

docker pull rockylinux/rockylinux:<tag>

replacing <tag> with 9.6 for example. Obviously that won’t solve your reposync problem, as that is something else entirely. But if reposyinc is using 9 instead of 9.5 or 9.6 which is symlinked to 9, then that would explain why it overwrote what you had synced previously.

To add on to this, mirrorlist doesn’t support the previous version either. So setting releasever will not work. This means you will need to create repo files or modify your current repo files to point to the vault in baseurl.

1 Like

I’m using a Dockerfile, which starts:

FROM rockylinux:9

If I replace that with:

FROM rockylinux:9.5

I get:

ERROR: failed to solve: rockylinux:9.5: failed to resolve source metadata for docker.io/library/rockylinux:9.5: docker.io/library/rockylinux:9.5: not found

You’re quite correct though, replacing that with rockylinux/rockylinux:9.5 seems to work! It seems to be different from Alma/RHEL in that sense.

Replace it with:

rockylinux/rockylinux:9.5

to use the short name, as I already explained needs the docker library side sorting out, which is why it doesn’t work with the way you did it. Use the longer name as above. In the post I linked @neil needs to fix the docker library side for the shorter name to be used. Podman though works far better since the image side is locally, and doesn’t require changes on docker hub each time. In fact with podman, you can even create your own shortname on your servers.

Thanks, I did that and it works fine. The only issue I get then is that I get 404’s looking for the URL’s with reposync, which implies that --releasever does work, but obviously can’t find 9.5 on the mirrors, obviously.

If I edit rocky.repo and point it at https://dl.rockylinux.org/vault/rocky/9.5/ then it all works fine. At least I should be able to fix my local mirror with that.

Thanks for your help.

1 Like

This is how I solve it on my Rocky server with podman instead of docker:

root@vpc-ian:~# cat /etc/containers/registries.conf.d/99-rockylinux.conf 
[aliases]
  "rockylinux" = "docker.io/rockylinux/rockylinux"

then with podman, in Dockerfile, I can just use:

FROM rockylinux:9.5

Yep, since 9.6 is now linked to 9, that’s the way you would need to resolve it to continue using 9.5. Glad you got it working :slight_smile:

We do know that Red Hat has not released packages for RHEL 9.5 since RHEL 9.6 was released.
Therefore, there should have been many (or any) packages released for Rocky 9.5 since that date.

That was the moment when I did stop mirroring 9.5 content to my local copy, so my copy “froze”.
Local copy of 9.6 got its own directory.

That’s the plan, but unfortunately my container “contaminated” my 9.5 folder with 9.6 :slightly_frowning_face: Not only that, but as I had --delete in there it got rid of everything 9.5. If only rsync worked through our firewall…