Esthenia-collaboration / rfswarm-docker

Simple docker container wich make rswarm performance tool easy to launch
1 stars 0 forks source link

Create a user to avoid running the agent with root user #55

Open Maresther-B opened 1 month ago

Maresther-B commented 1 month ago

A issue has been reported by Dave, while trying to run estheniacollaboration/rfswarm-agent-seleniumlibrary-chrome image with a DISPLAY on his mac computer.

The Dockerfile containt's used by Dave is:

FROM estheniacollaboration/rfswarm-agent-seleniumlibrary-chrome:latest ENV DISPLAY=192.168.13.141:0 where 192.168.13.141 is the IP of his mac.

This happen because we can't run root apps on a remote display

Dave think that, maybe the better option is to create a user like rfsagent and switch to that before running the entrypoint

The steps realized to reproduce the issue are described below:

Here is a link which explains the context: https://www.docker.com/blog/understanding-the-docker-user-instruction/

Thanks to @Dave for the report

damies13 commented 1 week ago

OK working on some steps to help you reproduce the issues and get a working image

On Mac:

On docker machine (this might be your mac or another machine, for me it's a Linux VM)

Demonstrating the issue where Chrome crashes even without being run in robot framework or rfswarm-agent

Attempting to fix the issue, I investigated a number of the crash reasons and added them to a docker file in the xtestu directory:

I haven't figured out the full solution but I think this will help you on the right track and help you troubleshoot the issue.

Maresther-B commented 1 week ago

Thanks so much Dave, this is well detailed.

Maresther-B commented 1 week ago

.K I reproduced the issue and I got this error message: [34:34:1106/223443.549030:ERROR:zygote_host_impl_linux.cc(101)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180. This is while running the image without any custom user