How to run a docker container from sbt before tests start?

Viewed 1180

When I google this question, it's all about creating a docker container with sbt. But I want the opposite: Running a docker container (or docker compose) from sbt.

1 Answers

If you should run a container for a test I can suggest sbt-docker-compose, you can set a timeout after which the test will be execute.

It's a sbt plugin, with sbt dockerComposeUp you can put all the containers running. Otherwise with the command sbt dockerComposeStop all the containers will stop.

Related