# Installing additional packages in filebeat 9.X docker

**URL:** <https://discuss.elastic.co/t/installing-additional-packages-in-filebeat-9-x-docker/381415>\
**Category:** Beats\
**Tags:** docker, filebeat\
**Created:** [August 28, 2025, 10:40am UTC](https://discuss.elastic.co/t/installing-additional-packages-in-filebeat-9-x-docker/381415 "2025-08-28T10:40:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dangbert](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dangbert/32/144823_2.png) [@dangbert](https://discuss.elastic.co/u/dangbert)\
**Post date:** [August 28, 2025, 10:40am UTC](https://discuss.elastic.co/t/installing-additional-packages-in-filebeat-9-x-docker/381415/1 "2025-08-28T10:40:52Z")

</div>

I understand Filebeat’s Docker image [switched in version 9.0.0](https://github.com/elastic/beats/pull/42150) from an Ubuntu base to redhat/ubi9-minimal

The `tree` command thus no longer works inside the docker image, how can I install it? It doesn’t work with microdnf. To use EPEL do I need a redhat subscription?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 28, 2025, 10:59am UTC](https://discuss.elastic.co/t/installing-additional-packages-in-filebeat-9-x-docker/381415/2 "2025-08-28T10:59:26Z")

</div>

Unlisted on August 28, 2025, 10:59am UTC



---

<div class="post-metadata">

**Author:** ![dangbert](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dangbert/32/144823_2.png) [@dangbert](https://discuss.elastic.co/u/dangbert)\
**Post date:** [August 28, 2025, 11:00am UTC](https://discuss.elastic.co/t/installing-additional-packages-in-filebeat-9-x-docker/381415/3 "2025-08-28T11:00:38Z")

</div>

I found some related docs from redhat (which this forum won’t allow me to link to 😕 ) but `tree` doesn’t seem to be available in the default package repos.

```auto
$ microdnf repolist

(microdnf:529): librhsm-WARNING **: 10:58:43.795: Found 0 entitlement certificates

(microdnf:529): librhsm-WARNING **: 10:58:43.796: Found 0 entitlement certificates
repo id repo name
ubi-9-appstream-rpms Red Hat Universal Base Image 9 (RPMs) - AppStream
ubi-9-baseos-rpms Red Hat Universal Base Image 9 (RPMs) - BaseOS
ubi-9-codeready-builder-rpms Red Hat Universal Base Image 9 (RPMs) - CodeReady Builder

# no results:
$ rpm -qa | grep -i tree

```

I also enabled EPEL but it doesn’t appear to contain tree either

```auto
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 28, 2025, 1:15pm UTC](https://discuss.elastic.co/t/installing-additional-packages-in-filebeat-9-x-docker/381415/4 "2025-08-28T13:15:50Z")

</div>

Listed on August 28, 2025, 1:15pm UTC



---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [August 28, 2025, 2:31pm UTC](https://discuss.elastic.co/t/installing-additional-packages-in-filebeat-9-x-docker/381415/5 "2025-08-28T14:31:47Z")

</div>

Did you install it with `yum install tree` after installing EPEL?

`rpm -qa` only returns installed package, so if it is not installed it will not return anything.

Try to use `yum whatprovides tree` to see what package provides it.

---

<div class="post-metadata">

**Author:** ![dangbert](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dangbert/32/144823_2.png) [@dangbert](https://discuss.elastic.co/u/dangbert)\
**Post date:** [August 28, 2025, 3:48pm UTC](https://discuss.elastic.co/t/installing-additional-packages-in-filebeat-9-x-docker/381415/6 "2025-08-28T15:48:19Z")

</div>

Hi @leandrojmp thanks for the advice, yum doesn’t appear to be available in the docker image though I think it’s just microdnf and the rpm command.

Here’s my Dockerfile for reference:

```auto
FROM elastic/filebeat:9.1.2 AS base

USER root
RUN microdnf install -y which

```

when I get a shell into the container after building I observe there’s no yum, `yum: command `  
`not found`.

maybe this is a similar command to the one you’re suggesting:

```auto
$ microdnf repoquery | grep -i tree

(microdnf:116): librhsm-WARNING **: 15:44:34.089: Found 0 entitlement certificates

(microdnf:116): librhsm-WARNING **: 15:44:34.091: Found 0 entitlement certificates
ostree-2025.1-1.el9.i686
ostree-2025.1-1.el9.x86_64
ostree-libs-2025.1-1.el9.i686
ostree-libs-2025.1-1.el9.x86_64

```

I tried `microdnf install -y ostree-2025.1-1.el9.x86_64 ostree-libs-2025.1-1.el9.x86_64` just to be sure but these don’t provide the tree command.

Is it possible that such a command like tree is only available in the full version of red hat (requiring a license). Cause I don’t see it in EPEL either

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [August 28, 2025, 4:38pm UTC](https://discuss.elastic.co/t/installing-additional-packages-in-filebeat-9-x-docker/381415/7 "2025-08-28T16:38:32Z")

</div>

> [@dangbert](#):
>
> I tried `microdnf install -y ostree-2025.1-1.el9.x86_64 ostree-libs-2025.1-1.el9.x86_64` just to be sure but these don’t provide the tree command.

`ostree` is not related to the `tree` command.

> [@dangbert](#):
>
> Is it possible that such a command like tree is only available in the full version of red hat (requiring a license). Cause I don’t see it in EPEL either

Probably, I do not use this image so I cannot confirm, but why you need `tree` inside the container?

You may need to build your own image for Filebeat if this is a requirement.
