I have an issue with the Docker container where the container stopped automatically after starting. I am not able to figure out what is the issue.
Here is my simple DockerFile where i am pulling the tomcat image and deploying my war file to the /usr/local/tomcat/webapps folder
RUN apt-get update && apt-get -y upgrade
ADD app.war /usr/local/tomcat/webapps/app.war
I am using the following command to start the container
docker run -p 8091:8091 -d containerName
After running the above command, i can see that tomcat server is starting. When it started completely, the container stopped automatically.
I have tried using different commands like below, but didn’t help.
docker run -p 8091:8091 -itd containerName
Am i using wrong parameters to run the container ? Should i need to update the dockerfile ? Any information would help me in solving this issue.