As you may know, the docker-compose process does not exit with an error exit code if one of the containers fails. In case you have a container running a linter or some tests you will get a zero exit code from docker-compose even if tests fail.

This behavior of compose is OK, since it acts more as a manager to spawn containers, but if you wanted to setup CI to fail when one of the containers that get started by docker-compose fails you will have to figure out how to resolve it.

There are many options, but one possible option is to run docker-compose and then check the docker-compose ps output and scan the exit codes and exit with an error code if any of the containers failed to exit gracefully.

Here is a basic bash script to demonstrate the general idea:

docker-compose --file=docker-compose-development.yml ps -q | xargs docker inspect -f '{{ .State.ExitCode }}' | while read code; do  
    if [ "$code" == "1" ]; then    
       exit -1
    fi
done  

You can then use the output of the bash script as an indicator of container failure.