How to combine CMD and ENTRYPOINT

As @meyay already mentioned, the CMD will be the argument of the entrypoint script. It means the will not run independently of the command as if it were a bootstrap phase executed by the same executor as the command. This is why you have to use the exec line as meyay suggested.

The execution can be more complicated and conditional, but it will not run automatically. Without it bash will have PID 1 and it would be responsible for forwarding signals, but it will not do that and the Apache HTTPD server will be killed forcefully every time after 10 seconds instead of shutting down gracefully.

In both cases bash would have PID 1. The difference is that in the first case docker ps would show

bash /var/www/config/bootstrap.sh apache2-foreground

and in the second it would only show

/var/www/config/bootstrap.sh apache2-foreground

It would not change the behavior that in the container the process would look like this:

bash /var/www/config/bootstrap.sh apache2-foreground

So exec is required in both cases.