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

Red Hat cert requires that images not be run as root #72

Merged
merged 4 commits into from
Oct 9, 2020

Conversation

ajm01
Copy link
Collaborator

@ajm01 ajm01 commented Oct 7, 2020

eliminate usage of root user in Dockerfile/base image

Fixes #71

…e of root user in Dockerfile

Signed-off-by: Andrew J. Mauer <ajmauer@gmail.com>
@ajm01 ajm01 force-pushed the eliminate-use-of-root-user branch 3 times, most recently from 4b9a30a to 45b6343 Compare October 7, 2020 21:13
Signed-off-by: Andrew J. Mauer <ajmauer@gmail.com>
@ajm01 ajm01 force-pushed the eliminate-use-of-root-user branch from 45b6343 to 5cafb7d Compare October 7, 2020 21:13
Signed-off-by: Andrew J. Mauer <ajmauer@gmail.com>
baseimage/Dockerfile Outdated Show resolved Hide resolved
baseimage/Dockerfile Outdated Show resolved Hide resolved
baseimage/Dockerfile Outdated Show resolved Hide resolved

USER java_user

RUN chmod -R 755 /stacks/java-openliberty/starterapp
Copy link
Member

Choose a reason for hiding this comment

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

I don't think you need a chmod here... java_user is the owner

Signed-off-by: Andrew J. Mauer <ajmauer@gmail.com>
WORKDIR /stacks/java-openliberty/starterapp
USER java_user

RUN chmod -R 755 /stacks/java-openliberty/priming-app
Copy link
Member

Choose a reason for hiding this comment

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

Don't think we need this since java_user already owns this. But this is an empty dir, so probably not worth respinning.

@ajm01 ajm01 merged commit c46075c into OpenLiberty:master Oct 9, 2020
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.

Modify stack image to run as non-root user
2 participants