Install packages on jboss/keycloak

Viewed 1949

When running locally a jboss/keycloak container, I try to add more software.

So far, I have tried:

~# yum install jq
bash: yum: command not found

~# apt-get install jq
apt-get: command not found

Does anybody know how can I install more software?

# uname -a
Linux 935559ef2e4c 4.19.76-linuxkit #1 SMP Tue May 26 11:42:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Update #1

It looks like microdnf is what I have to use, but I am still getting errors:

root@276cdd5cc962 /]# microdnf update -y
(microdnf:1614): librhsm-WARNING **: 20:38:39.628: Found 0 entitlement certificates
(microdnf:1614): librhsm-WARNING **: 20:38:39.630: Found 0 entitlement certificates
(microdnf:1614): libdnf-WARNING **: 20:38:39.630: Loading "/etc/dnf/dnf.conf": IniParser: Can't open file
Downloading metadata...
Downloading metadata...
Downloading metadata...
Nothing to do.

The file "/etc/dnf/dnf.conf" does not exist.

1 Answers

The container itself is using RedHats Universal Base Image and seems to use microdnf for managing software.

Check the dockerfile of jboss/keycloak (https://hub.docker.com/r/jboss/keycloak/dockerfile) to check, how it's done. The interesting part is:

RUN microdnf update -y && microdnf install -y glibc-langpack-en gzip hostname java-11-openjdk-headless openssl tar which && microdnf clean all

So you may try adding additional software using the microdnf command.

A better solution might be to create your own Dockerfile deriving from jboss/keycloak to add your additional software.

Related