-
-
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
fix: changing owner while creating container for download support #2064
Conversation
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.
I know the changes are well intended because we want to enable users to just run containers without the need for workarounds.
However, now we have 3 new scripts and several changes in many Dockerfiles, which increases the maintenance of the images. While these scripts juggle and find the ideal values, the whole thing gets harder to maintain.
I am really happy for all the good work that you are doing, but in this case, after seeing all the overhead to cover this use case, I feel we should go back to just mentioning the workaround in the README.
What do you think?
@diemol, I understand your concern, always the situation is easy to add but difficult to keep it up-to-date :) |
105f4a9
to
c7cdb8a
Compare
@diemol, I see your changes and I think I know the problem. The way I solved the permissions issue is not by changing permissions but by running compose with There are more comments. Here is a link to the thread: https://seleniumhq.slack.com/archives/C0ABCS03F/p1702412090176059 |
In our CI there are tests to guarantee arbitrary --user {{ randomUID }} |
Signed-off-by: Viet Nguyen Duc <[email protected]>
After trying something, when |
@diemol In my opinion this feature is unnecessary. using an alternative download directory is a reasonable feature, but selenium has the ability to mount remote directories so I don't understand the need for creating directories. If the problem is the inability to mount directories on video and browser nodes in dynamic grid environments, the correct fix in my opinion is to add the ability to define remote directories in the config.toml. I believe that if this feature is to remain then there should be a flag or var to enable it, but it should be disabled by default. |
I just tested ndviet/node-docker:latest and ndviet/hub:latest
|
That is good feedback, @therealdjryan, thank you. My thought was to release the feature and get feedback and then decide if we wanted to keep it or not. Probably it is not being as helpful as we thought? What do you think, @VietND96? Should we leave it as it was before all these changes? |
Hi @therealdjryan, thank you for your feedback. As of now it would be disabled and not touch main process if |
@VietND96, I'm going on vacation in a couple hours so I may not have a chance to look until the new year. |
@therealdjryan, sure, have a nice vacation. I'm also going to isolate and rollback this feat in next stable release, and will rework it in some time |
@VietND96, @diemol |
Hi @therealdjryan, docker-selenium/Base/Dockerfile Line 131 in 7b7faff
The issue looks like due to this VOLUME instruction in Dockerfile. I had misunderstood usage of this instruction, it easier to start containers without remembering the -v flags to apply. That means it always mounts a temporary folder in the host even the user without specifying -v when starting the container. |
It causes the issue mentioned in #2064 (comment)
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
fix: changing owner while creating container for download support
Motivation and Context
PermissionError: [Errno 13] Permission denied: '/var/log/supervisor/supervisord.log'
Command reproduce
docker run --user $(id -u):$(id -g) -d selenium/hub:4.16.1-20231212
Types of changes
Checklist