I’m having some trouble running tests on CircleCI using the
docker-compose.yml file we use to test locally.
What I want to do is:
- Spin up services using
docker-compose up -d
- Have port mappings of aforementioned services to
- Run tests (e.g.
The article on
docker-compose suggests that this can’t be done with the
Note: The primary container runs in a seperate environment from Remote Docker and the two cannot communicate directly. To interact with a running service, use docker and a container running in the service’s network.
If you want to use docker compose to manage a multi-container setup, use the machine key in your config.yml file and use docker-compose as you would normally.
So it seems that using
machine instead of
docker is the way to go. However, the choice of images to run via
machine seems rather limited. In particular, I’ve had trouble installing
sassc: relocation error: sassc: symbol _ZTVNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
Seems to me that another option is possible: include the app as a service in
docker-compose.yml and run tests through it. Is there an example of this that I can refer to?