One option would be to use remote Docker. You’d need to set up an image/dockerfile that runs the app, and another attached to the same docker network that runs the tests.
If you are installing Docker in your build machine, then you can run Docker-in-Docker from there. I expect that you would be able to use Docker in that fashion - DinD works very well in CircleCI. I expect you’d just drop the -t option and use localhost (since from the perspective of your build machine, one layer down, localhost does indeed refer to your Docker API address, to control containers two layers down).
Could you prep a small example on a public GitHub/Bitbucket repo?