My dockerized Scala application uses GitLab CI for testing and deploying.
Deploying works fine, but for testing I require docker-compose to be available since the tests run against the application’s containers.
The base image provides Docker and SBT for building the app.
If I have understood the docs correctly, dind includes Docker Compose.
Yet when I execute my tests with dockerComposeTest, an SBT task provided by this nice plugin that uses Docker Compose to start up the app’s containers and runs tests against them, I get the following error:
java.io.IOException: Cannot run program “docker-compose”: error=2, No such file or directory
How can I make docker-compose available in that job so the SBT task can use it?
docker-compose is not included in docker:latest image.
You can create your own image based on docker:latest with a Dockerfile like this one, which is inspired by the official dockerfile from https://github.com/docker/compose/blob/master/Dockerfile.run