Add docker device mapping configuration#10645
Add docker device mapping configuration#10645diemol merged 6 commits intoSeleniumHQ:trunkfrom gifflet:add_docker_device_mapping
Conversation
|
The documentation was updated in SeleniumHQ/seleniumhq.github.io#1011 |
diemol
left a comment
There was a problem hiding this comment.
Code looks fine, thanks for the PR. I'd just like to understand better what the use case for this is, how would you be using this feature?
|
Thank you @diemol for reviewing this PR. Answering your question, I implemented this change because the containers launched by selenium grid perform virtualization of virtual machines, that is, a virtual machine is started offering the native web browser of the platform at the same time that the selenium server runs in the virtual machine in standalone mode . So I need the containers to have access to the /dev/kvm device, available on the host, for the virtualization tool to work as expected. |
|
Can volumes be used instead of devices? |
|
Got it, thanks. Can you please have a look at the issues reported by Sonar? |
|
Sure, I will work on it. |
|
@diemol, I could not reproduce the issue reported by Sonar but I think that the last commit solves it. |
|
Can you please rebase first? Or let us do it by enabling the PR? |
|
Maybe I missed it, but I do not see the other Sonar issues being addressed. |
Sometimes is needed to map a device file to a docker container to make possible some tasks like virtualize a VM or something else. Because of this, I believe it is desirable to have a way to configure which device files should be available in containers. In this commit, we can define which device files should be mapped in containers through the standard selenium grid configuration file.
|
The other issues reported by Sonar was fixed in the last commit. The rebase was done as suggested. |
|
I'd love to merge this but if I can't update this branch on my own is just going to take longer. Can you please update your fork? |
|
@diemol, I just enabled maintainer editing, so I believe you will be able to update this branch. |
|
Thanks |
|
SonarCloud Quality Gate failed. |
* Update docker configuration section in documentation This PR is the documentation of SeleniumHQ/selenium#10645. * Comment out the devices declaration [deploy site]
* Update docker configuration section in documentation This PR is the documentation of SeleniumHQ/selenium#10645. * Comment out the devices declaration [deploy site] 78dc23e
* Add docker device mapping configuration Sometimes is needed to map a device file to a docker container to make possible some tasks like virtualize a VM or something else. Because of this, I believe it is desirable to have a way to configure which device files should be available in containers. In this commit, we can define which device files should be mapped in containers through the standard selenium grid configuration file. * Device mapping configuration added do selenium grid cli options * Added tests to cover the device mapping processing and validation * Trying to fix the regex backtracking issue * Fix code smells reported by Sonar Co-authored-by: Diego Molina <[email protected]>









Description
Configure docker containers device mapping
Motivation and Context
Sometimes is needed to map a device file to a docker
container to make possible some tasks like virtualize
a VM or something else. Because of this, I believe it
is desirable to have a way to configure which device
files should be available in containers.
In this commit, we can define which device files should
be mapped in containers through the standard selenium grid
configuration file.
Types of changes
Checklist