Issue
I have an application, fully contained in a Docker image, that will run multiple times on the same host (from what I understand, this rules out docker-compose
which is the solution to a lot of other questions in this genre of question).
One aspect of this application is a caching layer. In years past, I've used redis as a caching layer for this application.
I'm trying to update the application from an old centos version to the new RedHat UBI line of base images. I'm running into some trouble since redis does not seem to be included in any of the "standard" package managers or the EPEL packages for RHEL 9. Whenever I build, I get the following error message:
#5 4.518
#5 12.98 Extra Packages for Enterprise Linux 9 - x86_64 1.1 MB/s | 9.0 MB 00:08
#5 14.73 Last metadata expiration check: 0:00:07 ago on Thu Aug 11 19:05:09 2022.
...
#5 15.45 No match for argument: redis
#5 15.45 Error: Unable to find a match: redis
------
Looking at the package list for centos, I can see redis in the EPEL packages for RHEL 7, but not for either 8 or 9.
It looks like the official recommendation of redis is to install using snap. Trying to install snapd in a UBI image presents this error message (I used the --nobest
flag since a prior install requested it):
#5 8.913 Last metadata expiration check: 0:00:03 ago on Thu Aug 11 19:12:53 2022.
...
#5 8.933 Error:
#5 8.933 Problem: conflicting requests
#5 8.933 - nothing provides squashfs-tools needed by snapd-2.56.2-1.el9.x86_64
#5 8.933 (try to add '--skip-broken' to skip uninstallable packages)
So it appears that trying to install snapd in a UBI is broken.
I don't really care about installing snapd - all I care about is getting redis installed.
Is there a consistent way to install redis in a UBI container image?
Solution
The solution I came up with was to install redis from source.
The documentation around doing so is (as of this answer) very good, and can be found here: https://redis.io/docs/getting-started/installation/install-redis-from-source/
Answered By - distortedsignal Answer Checked By - Willingham (WPSolving Volunteer)