# Docker container is automatically getting exited

**URL:** <https://forum.codewithmosh.com/t/docker-container-is-automatically-getting-exited/8943>\
**Category:** Uncategorized\
**Created:** [December 3, 2021, 2:06am UTC](https://forum.codewithmosh.com/t/docker-container-is-automatically-getting-exited/8943 "2021-12-03T02:06:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nanicoder](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/nanicoder/32/2701_2.png) [@nanicoder](https://forum.codewithmosh.com/u/nanicoder)\
**Post date:** [December 3, 2021, 2:06am UTC](https://forum.codewithmosh.com/t/docker-container-is-automatically-getting-exited/8943/1 "2021-12-03T02:06:21Z")

</div>

I am facing issue with docker container getting exited immediately after run.

docker container is active only when we are adding “sleep infinity” at last

command: docker run -it -d react-app sleep infinity

Can someone help me with this?
