Docker Compose no Exit code on log Error

I want to receive exit codes from docker-compose when receiving Error: log messages

When for example providing an impossible port mapping, the creation fails with Errors in the log:

Creating containername... 
ERROR: for containernameCannot create container for service servicename: invalid port specification: "100000"
ERROR: for servicenameCannot create container for service servicename: invalid port specification: "100000" Encountered errors while bringing up the project.

However, the exit code ($?) is 0

Am I missing something?
Does docer-compose creade exit codes?

Best Regards

The error is known and simple. Port 100000 is impossible.

The problem lies in the missing exit code when starting with an incorrect yml file.

Hi, i think the closest you will come with using docker-compose is the --exit-code-from flag:

  --exit-code-from SERVICE   Return the exit code of the selected service
                              container. Implies --abort-on-container-exit.

The problem is here, I believe, that no container has been constructed yet.
Also, I have multiple containers, such a single service solution does unfortunately not apply.