Closed alatyshev closed 4 years ago
hrm.. can i see the template itself youære trying to use?
the yaml*
It's unmodified template from Master: https://github.com/ddavison/selenium-openshift-templates/blob/master/selenium-node-chrome.yaml
The culprit seems to be in dockerfile of chrome node, requring root privileges in OS3 project.
good news then, im actually the maintainer of those images from selenium :P if you/i find a fix, we can get it put in. i haven't used openshift for quite some time, so not sure i can reproduce
@ddavison this issue is due to Openshift's default restricted mode, where the container is run as a random user id. The line /opt/selenium/generate_config > /opt/selenium/config.json then attempts to write to /opt/selenium which it does not have permissions.
Fixes: change the script to allow writing to /opt/selenium from group 0 - see https://github.com/sclorg/s2i-base-container/blob/master/bin/fix-permissions as a example
and which image version are you using of selenium/node-chrome?
I wonder if the offending line is here: https://github.com/SeleniumHQ/docker-selenium/blob/master/NodeChrome/Dockerfile#L70
I could change this to chown -R seluser ..
(instead of specifying the group)`
Hi, I believe another way of fixing it would be to do the same as you (@ddavison) did in move the creation of the config.json file into a RUN directive #185 ?
That's what I did for one instance of openshift I'm using :
Typically, deleting the following line in
NodeBase/entry_point.sh
:/opt/selenium/generate_config > /opt/selenium/config.json
And adding in
NodeChrome/Dockerfile.txt
, just before theUSER seluser
:RUN /opt/selenium/generate_config > /opt/selenium/config.json
See this readme.
if you wanted to try your hand at it, go ahead and open a pull request to SeleniumHQ/docker-selenium and i'll merge it in!
Ok i'll try to do that today :)
Edit: So I think I did it (See this commit), I even prepared the pull request. However my company asks itself a lot of questions about contributing to an open source project (yes even for 3 lines), so I have to wait to see if I sign the CLA in my name only, or as an employee.
typically you'll sign just your name representative of yourself, not your company
I've changed some permissions in the images so it works on OpenShift Supporting the Arbitrary User IDs #5
Hi guys,
I'm getting the same issue as described above: openshift /opt/bin/entrypoint.sh: line 6: /opt/selenium/config.json: Permission denied
Any idea how to fix it?
This issue has been now resolved with newer docker images, so closing it.
Getting such error when starting node-chrome pod:
/opt/bin/entry_point.sh: line 4: /opt/selenium/config.json: Permission denied No Selenium Node configuration file, the node-base image is not intended to be run directly.