Don't run Selenium in a docker container just run it directly on the host machine. Running it on docker is just overkill and adds unnecessary complexity.
I'm running over 600 UI End-2-End tests on gihub actions with 4 cores for over a year now in under 45mins with this repo here -> https://github.com/DeLaphante/1CrmCloud/actions