# Main and error fallback container launch

**URL:** <https://forums.docker.com/t/main-and-error-fallback-container-launch/141723>\
**Category:** General\
**Created:** [June 1, 2024, 2:46am UTC](https://forums.docker.com/t/main-and-error-fallback-container-launch/141723 "2024-06-01T02:46:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nagkumar](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/nagkumar/32/47858_2.png) [@nagkumar](https://forums.docker.com/u/nagkumar)\
**Post date:** [June 1, 2024, 2:46am UTC](https://forums.docker.com/t/main-and-error-fallback-container-launch/141723/1 "2024-06-01T02:46:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/bluepuma77/32/32688_2.png) [@bluepuma77](https://forums.docker.com/u/bluepuma77)\
**Post date:** [June 3, 2024, 4:52pm UTC](https://forums.docker.com/t/main-and-error-fallback-container-launch/141723/2 "2024-06-03T16:52:06Z")

</div>

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