Skip to content

Conversation

@kabicin
Copy link
Member

@kabicin kabicin commented Aug 7, 2025

This temporarily uses root privilege to install required packages to run the Liberty MustGather (linperf.sh).
It supports Liberty Java images using version 21 (microdnf) and lower (yum).

Copy link
Member

@leochr leochr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kabicin Looks good. Just one minor comment.

Dockerfile Outdated
description="This image contains a sample application that displays the Java system properties and demonstrates MicroProfile Config, Health and Metrics."

USER 0
RUN command -v yum && pkgcmd=yum || pkgcmd=microdnf && $pkgcmd update -y && $pkgcmd install -y procps-ng net-tools ncurses hostname
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: use parentheses to separate the conditions, so it's clear / no ambiguity in the evaluation

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$pkgcmd will lose scope once parenthesized, however the && and || have equal precedence and will be evaluated from left to right. For better readability, I parenthesized the update/install command at the end.

@kabicin kabicin requested a review from leochr August 18, 2025 18:42
Copy link
Member

@leochr leochr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kabicin Thank you for the update. Looks good.

@leochr leochr merged commit 5d09fb4 into main Aug 18, 2025
6 checks passed
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.

3 participants