-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat: changing owner while creating container for download support #2056
Conversation
Signed-off-by: Viet Nguyen Duc <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A minor comment only.
I think this should not break support for platforms like OpenShift. Let's see what they say.
Signed-off-by: Viet Nguyen Duc <[email protected]>
a645a5a
to
14278ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @VietND96!
We are using your latest image as base in our project. Right after this change we start failing with: Any hints from your side to solve it @VietND96 ? Thanks! |
Hi @alexblatov, I saw the message that container is not running, can you share the container log during it was starting up to see any wrong happened there? |
thanks for reply @VietND96 ! In out docker file we use:
So we play with UID and GID a bit inside out code:
Any thoughts? |
@alexblatov, I am also trying to fix something relates to that |
Hi @alexblatov, this feat is reverted in latest released tag '20231219'. Can you recheck the issue gets resolved? |
Having this now: |
Ohh, may I know the last image tag that it worked with your scenario? |
latest tag on date 12 Dec 2023, worked. Latest tag from 13 Dec 2023 stopped working. @VietND96 |
adding password in environment variables violates security best practices and has caused palo alto(Prisma) vulnerability scans to fail. this type of feature may be best served by the recommendation to self-build the image since it's not a best practice. |
another potential resolution for this that might work around scanners or be considered better practice: |
nevermind. looks like this is solved here: #2061 |
Thanks for your review, the password set default via ENV was fixed in this PR, no more ENV containing sensitive data. https://github.com/SeleniumHQ/docker-selenium/pull/2061/files |
@alexblatov, I guess before tag docker-selenium/Base/Dockerfile Line 78 in 0b663b3
For now, after docker-selenium/Base/Dockerfile Line 101 in af16a26
There was a concern on perm As of now, I guess these use cases are fine to start the container:
For your scenario, I saw probably you will start the container with the host UID:GID, which is Within I am also aware of this issue, in another PR after that #2064, I added back However, also the same that PR, there was a discussion around the point After that, I went ahead to revert something, but still keep the change At that time, I thought that, if user want to run the image with both host UID:GID, they have to rebuild the image, with root perm and I am not sure that we can handle this without trace-off (container running well for both @diemol, can you also take a look and advise? |
LGTM, let's wait for feedback. |
thanks @VietND96 and @diemol ! All good from our side now. We used this hack to overcome 777 limits: RUN if [ ! -z $UID ]; then usermod -u $UID seluser ; find / -ignore_readdir_race -user 1200 -exec chown -h seluser {} ; ; fi` |
Thanks for contributing to the Docker-Selenium project!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines, applied for this repository.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
feat: changing owner while creating container for download support
Motivation and Context
Implement #1947 with highlight changes
fix-permissions
with given list of directories needed to change ownership. This script is ensuring the ownership withinseluser
and Support Arbitrary User IDs (follows https://docs.openshift.com/container-platform/3.10/creating_images/guidelines.html#openshift-specific-guidelines).SE_DOWNLOAD_DIR
. After changing, also have a step to verify directory can write, if not an ERROR is raised in stdout.CHOWN_EXTRA
allows the user to specify extra dirs that need to befix-permissions
. Multiple dirs are separated by comma,
. For example:-e CHOWN_EXTRA=/home/seluser/.vnc,/etc/certificates
MKDIR_EXTRA
allows the user to specify extra dirs that need to be created withfix-permissions
together. Multiple dirs are separated by comma,
Types of changes
Checklist