Skip to content

Latest commit

 

History

History
 
 

docker_compose

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Docker Compose

With InfraBox you cannot only run a single container as a job, but also use docker-compose to run multiple containers in a single job. For this use the "type": "docker-compose" in your job definition:

{
    "version": 1,
    "jobs": [{
        "type": "docker-compose",
        "name": "test",
        "resources": { "limits": { "cpu": 1, "memory": 1024 } },
        "docker_compose_file": "infrabox/test/docker-compose.yml"
    }]
}

The job will be finished as soon as one of the containers stops. The return code of this container determines if the job failed (rc != 0) or succeeded (rc == 0).

Caching, Transfering Data, Uploading Testresults are working the same as in the regular docker job. But be careful the same directory is mounted into all containers. So writing to the same file from different containers is undefined behaviour.

See the Docker Job Documentation for a detailed explanation about the options of a docker-compose job.