Restart containers in Docker Executor? like `docker-compose down; docker-compose up -d`?


Is it possible to restart containers in the Docker Executor?

The use-case is for resetting all datastores to a clean slate for integration testing. Rather than writing code to delete queues from rabbitmq, databases from postgres, keys from redis, indexes from ES, etc… it would be easier to do what we do with docker-compose, and just do a down and up to restart all services with a clean slate.

Any suggestions?


You could use different jobs, share the artifacts between them and start the jobs sequentially inside a workflow.


That works if you have like a 1 or 2 test cases (like smoke tests perhaps), but for a complex application with many features that interact with and “dirty” the databases with state that needs to be discarded, that’s not feasible.


Just wondering, anyone from Circle can comment on this?