Hello guys , help me sort this. When I create docker a container from an image in my ubuntu machine, it shuts automatically and is displayed in stopped container s instead of running containers , what cloud be the issue?
A container is not waiting (=keep running) if you don’t ask.
Imagine an image to do a simple task like removing a file (very simple task). By creating a container on that image, the file is removed and the container has finished his job. And that’s fine.
So, in your case, you wish to keep running. In that case you should foresee an ENTRYPOINT to run a background task like, you’ll find a lot of sample on the Internet doing a tail.
First result on Ggl : How to Keep Docker Container Running
1 Like