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

Change USER to use the numeric user in container image #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

superbrothers
Copy link

What this PR does / why we need it:

This PR changes USER to use the numeric user in container image.

Currently USER is specified as nobody (65534). Therefore, this container image runs as a non-root user. However, Pod SecurityContext's RunAsNonRoot policy does not consider to be "run as non-root" if USER is specified as non-numric.

Error: container has runAsNonRoot and image has non-numeric user (nobody), cannot verify user is non-root

The UID of nobody is 65534.

$ docker run -it --rm --entrypoint=id caicloud/event-exporter:v1.0.0
uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)

Which issue(s) this PR is related to (optional, link to 3rd issue(s)):

Fixes #

Reference to #

Special notes for your reviewer:

Release note:

NONE

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.

None yet

1 participant