Docker Compose workarounds with CircleCI's
Here is an example configuration with the work arounds listed below.
If you need to build Docker images (which our project does) you have to tell Circle to set up a remote docker environment to execute any docker commands. This isn't necessarily complex to add your configuration, it's a simple one-line addition.
However, it is not possible to mount folders (i.e the
volumes key in Docker Compose) for containers run by the remote docker instance.
This means you either to set up a separate
docker-compose.yml, without volumes and in your Dockerfile, make sure to
ADD any folders/code that you need available to run your tests.
Alternatively, you can start up a container, and copy files over (using
docker cp). Due to this, the
machine executor requires less configuration and from my experimentation has a negligible impact on the speed at which tests are run.