I have the same issue, but with maven
docker image (it based on OracleLinux 8).
Oracle Linux 8 & Postgresql13 Client
It was extremely unusual to install postgresql client on it, so, let's consider my steps:
https://www.postgresql.org/download/linux/redhat/
Select RHEL 8 and receive the rpm package link
Install it manually with rpm
microdnf install -y wget
wget https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm -O /tmp/pg_repo.rpm
rpm -i /tmp/pg_repo.rpm
Determine that there is no postgresql13
package. Click on the direct download link and select RHEL 8: https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-8-x86_64/
Download postgresql13-13.x.x...
package (latest)
wget https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-8-x86_64/postgresql13-13.3-2PGDG.rhel8.x86_64.rpm -O /tmp/pgql.rpm
Dependency list for that rpm:
libicu is needed by postgresql13-13.3-2PGDG.rhel8.x86_64
libpq.so.5()(64bit) is needed by postgresql13-13.3-2PGDG.rhel8.x86_64
postgresql13-libs(x86-64) = 13.3-2PGDG.rhel8 is needed by postgresql13-13.3-2PGDG.rhel8.x86_64
systemd is needed by postgresql13-13.3-2PGDG.rhel8.x86_64
systemd-sysv is needed by postgresql13-13.3-2PGDG.rhel8.x86_64
- Install dependencies
microdnf install -y systemd postgresql13-libs libicu
- Finally, install the client
rpm -i /tmp/pgql.rpm
Now you can clear the cache and test the client, e.g. pg_dump
command.
Result Dockerfile command:
RUN microdnf install -y wget && \
wget https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm -O /tmp/pg_repo.rpm && \
rpm -i /tmp/pg_repo.rpm && \
microdnf install -y systemd postgresql13-libs libicu && \
wget https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-8-x86_64/postgresql13-13.3-2PGDG.rhel8.x86_64.rpm -O /tmp/pgql.rpm && \
rpm -i /tmp/pgql.rpm && \
rm -f /tmp/pg_repo.rpm /tmp/pgql.rpm && \
microdnf remove -y wget
RHEL 8 & Postgresql13 Client (your case)
Now let's consider your case, image jboss/keycloak:14.0.0
based on RHEL 8.
Caveat: If you receive error message error: Failed to create: /var/cache/yum/metadata
, run as root user and than switch user back to jboss.
All steps and Dockerfile commands are the same.
Please, let me know if there are any mistakes or something is not well-described.