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

Set up the user in the packager stage #1730

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

skitt
Copy link
Contributor

@skitt skitt commented Jan 30, 2025

This allows shadow-utils to be removed in the final image, which reduces the exposure to CVEs in the relevant packages (shadow-utils and its dependencies). It also reduces the final image size by 3MiB.

This allows shadow-utils to be removed in the final image, which
reduces the exposure to CVEs in the relevant packages (shadow-utils
and its dependencies). It also reduces the final image size by 3MiB.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
@jiridanek
Copy link
Contributor

jiridanek commented Jan 30, 2025

That's something I considered suggesting yesterday, but decided against it. My suggestion actually would've been to not install shadow-utils in the first place, and only do

USER 10000

in the output image, for Kubernetes purposes.

Openshift will set random UID and add entry into /etc/passwd on its own. And skupper-router does not need no $HOME, iirc.

And I faintly remember that I saw before some non-redhat images that either did not bother with having the USER actually existing, or they set it to the UID of the nobody user that was present by default in their /etc/passwd.

But since I can't vouch for "works in Kubernetes without any issues", I decided not to speak.

@skitt
Copy link
Contributor Author

skitt commented Jan 30, 2025

@jiridanek yes, it might be simplest to just rely on the USER statement without actually adding entries in /etc/passwd and /etc/group in the image itself — it’s unlikely that anything in the router itself relies on finding a name for the uid (but I haven’t checked).

@ganeshmurthy ganeshmurthy merged commit ab29b6c into skupperproject:main Jan 30, 2025
41 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