Not on the CircleCI side, no. Also, the networking system in CircleCI is completely customised, and the listener IP addresses are proxied to the localhost of the build container. So, assuming selenium/standalone-firefox-debug listens on port 4444, it will be proxied to localhost:4444 on the build container.
If you have two endpoints to test, could you make them available in the build container on different ports? My only wonder is whether selenium/standalone-firefox-debug can reach them, given that they will be on localhost addresses (for the build container), but to Firefox, that will refer to its own container.
You may have more luck - and there is a lot more flexibility - if you can drop the secondary containers and run all your requirements in Docker-in-Docker. I’ve got fairly complex set-ups working this way, using PhantomJS.
Unfortunately, the test servers only respond to the custom hostname.
Docker-in-Docker sounds very appealing. Have you noticed any downsides? Caching? Performance? Debugging? Test result reporting?
It sounds a bit more of an overhaul but perhaps it should be the long-term goal for our setup. At the moment, I ended up just building a new image and hosting it in our AWS bucket.
Now I have to figure out how to configure Circle to use --shm-size 2g to avoid Firefox crashing when running a ton of tests…