-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
Currently I've built my own in a custom library
def call(Closure body) { docker.withTool('Default') { withPythonEnv('python') { sh 'pip install docker-compose' sh 'docker-compose --no-ansi up -d' try { waitUntil { script { dockerUtils.isReady() } } body() } finally { sh 'docker-compose --no-ansi down' } } } }
The isReady() function is a little complicated - it essentially does
docker inspect --format '{{json .State}}' $(docker-compose ps -q)
then parses and checks that every container has either Health.Status == 'healthy', or Status == 'running' if there is no healthcheck.
You could implement something similar, and more configurable, directly.