It's not a bug, it's a feature :)
Out of the box, PHP puts the max_exection_time setting to 0 in CLI. This is part of the doc: http://php.net/manual/en/info.configuration.php#ini.max-execution-time
The parameter should work ok in Apache or PHP-FPM though.
In CLI mode, you can still set it manually in your PHP script as explained here: https://stackoverflow.com/questions/5874950/set-max-execution-time-in-php-cli
https://github.com/thecodingmachine/docker-images-php/issues/101#issuecomment-445227244