Main and error fallback container launch

Is it possible for the container to start with ngnix, but if ngnix fails to start for some reason, can I specify in Dockerfile launch to bash shell

I wish to debug upon any error, hence, an active shell session automatically on error can be beneficial.

In regular shell, you would use something like nginx || bash. But it needs to works with the (usually used) entrypoint script.