Here is an issue.
Both docker images are launched using 4444:4444 by default, so only one browser can be used.
(Firefox can be used in the above setting because docker start it first with 4444)
Firstly, none of those services do publish ports. Containers only expose default ports that are defined in the image - in this case both 4444. And this is a bit unfortunate, since the exposed port you cannot change unless you change the image.
So, as far as I see, the only way out is if you customize one of the images by changing the entrypoint and the port on which the service is running, as well as the exposed container port. Then of course you can use your customized image, instead of the official one.
Seems I can’t do anything with the official image if this is the case.
Previously I thought there could be a way to override the default port used in the docker image by some Gitlab CI settings.
When you change a port, you cannot change the internal container one you would normally do 4445:4444. The first number is the port you can connect to remotely and you can change this to anything you want, which is then redirected to the container port that is always 4444 in this case.
I have similar when I run multiple web containers that expose port 8080 internally. So in this case you just have one container with 8080:8080, and the other with 8081:8080. Or, when running Gitlab with docker, usually a Linux system has port 22 for SSH, so means you cannot use the Gitlab container with 22:22, so the Gitlab docs use another port, eg: 2222:22.
I’ve no idea if you can do anything with this in CI/CD or not, as I don’t use CI/CD, but in theory it should be possible.