Can't connect to docker container

As was noted by this user (Tests can't connect to localhost in docker), almost a year ago, it’s still not possible to connect to a docker container in V 2.0. That’s kind of an important feature since it’s not possible to do any testing of the front end (like checking for a basic 200 status). Please advise.

Here’s my first post about this issue
https://discuss.circleci.com/t/how-to-connect-to-docker-boxes-when-using-executor-type-docker/13888

Was able to figure out this is working as expected. Trying to figure out how to get what I need with a separate docker image.

This is working as expected you say?

Then what is the preferred method of verifying Docker endpoint connectivity from within the CI build container?