Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rsyslog & util-linux package Containerfile #1719

Closed
wants to merge 2 commits into from

Conversation

ukumar009
Copy link

Added rsyslog and util-linux package for logging support.

Fix for: #1718

Added `rsyslog` and `util-linux` package for logging support.
keeping systemd-libs package.
because, rsyslog depends on systemd-libs package.
@kgiusti kgiusti linked an issue Jan 21, 2025 that may be closed by this pull request
@kgiusti
Copy link
Contributor

kgiusti commented Jan 21, 2025

Hi Uday - can you try changing this line by removing where microdnf is removed instead? Keeping microdnf in the container would be very useful, thanks.

@ganeshmurthy
Copy link
Contributor

ganeshmurthy commented Jan 22, 2025

We removed microdnf as part of removing gnutls (see e8ae8f1)
gnutls was causing lots of CVEs, so we removed it which ended up removing 'microdnf' because it depended on the former.
Removing 'microdnf' is actually good security wise since no one can install additional packages to mess with the container.

I don't know much about rsyslog but can the logs be copied out of the container and rsyslog be run on those logs ?

@c-kruse
Copy link

c-kruse commented Jan 22, 2025

An alternative would be to build a container image with these packages installed (rather than including a package manager.)

Maybe something like this?

# Containerfile
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest as overlay
RUN mkdir overlay && \
  microdnf install \
        --noplugins \
        --installroot /overlay/ \
        --releasever 9.5 \
        --config=/etc/dnf/dnf.conf \
        --setopt=reposdir=/etc/yum.repos.d \
        --setopt=cachedir=/var/cache/microdnf \
        --setopt=varsdir=/etc/dnf \
        --setopt=install_weak_deps=0  \
        --nodocs \
        -y \
        rsyslog util-linux

FROM quay.io/skupper/skupper-router:2.7.3-1
COPY --from=overlay /overlay /

It seems to me that stripped down container images without a package manager are very popular, and there should be pretty well documented means to get packages installed in those environments. Not a rhel ecosystem pro, but this approach appears to work well for me. Maybe look at docs on how to use the ubi9 micro container images (does not have a package manager by default)?

EDIT: to be clear, in this alternative the upstream skupper-router image stays rsyslogd free and continues to keep a minimal set of dependencies. Users that want to alter the behavior of the container to use rsyslogd are free to do so.

@ukumar009
Copy link
Author

Thank you @c-kruse I will try it out and let you know.

@ukumar009
Copy link
Author

Hi @c-kruse I tried your approach and it is working as per our expectation. So, I am happy to close the issue and PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Install rsyslog, util-linux packages as part of skupper-router image
4 participants