Docker Community Forums

Share and learn in the Docker community.

Docker Container exiting automatically on aws EC2 instance

Hey everyone. I deployed a react application on AWS EC2 instance. I deployed my application by setting up CI/Cd pipeline, everything works fine like my application successfully deployed on AWS but after some hours my Docker container exits automatically on EC2 and my application went down. I just don’t know the issue. Please share if you know the issue.

AWS EC2 (t2.medium) instance, I am using for my application.


I am afraid you will have to provide more details then you did so far.
Posts without sufficient details to understand the issue, usualy attract less people and tend to remain unanswered,

Thus, said: help us to help you!

Okay, So I am deploying a MERN stack application on an AWS EC2 instance, And I set up a CI/CD pipeline. And I am using Github Actions, Docker, and AWS Code Deploy as tools to set up CI/CD. Everything is working fine but the thing is after some time around 8 hours my container automatically goes down on my EC2 instance.
And if you want some more info please share here, I can share the same.