I got error: /bin/sh: 3: cannot create /root/.netrc: Permission denied
From searching I understand I have to change user to match the one in image. Current user in image is seluser. Can I overwrite USER in dron? I searched dron enviorements, but there was no option like that.
Actually it seems to be the other way around! I believe Drone is mounting a shared volume at /root/ as “root” user (the .netrc file is used to authenticate with GitHub). But the selenium image can’t mount it because its not started as root.
So if you could configure Selenium to start as “root” it should fix this. You could try creating a new selenium image and overwrite the user.
Not sure if this is something that could be addressed though (and I’m not completely sure this would solve the problem, which has to do with mounting volumes, would need to test it).
By the way, as a bonus, in one of my pipelines I’m running Selenium as a service, and had no issues:
The Selenium image needs to start a daemon, and when you use the image in your pipeline section and you specify the commands section, it overrides the default entrypoint, which means the daemon won’t start. So this is why you want it as a service.