Docker container exiting after start

I commit image of a running nginx container pushed it to the Docker Hub and now when i am trying to launch a container using the same image(basically by pulling this image on Docker Hub from another server) the container is exiting immediately after start. How to debug ? How can i fix this ?

what is the entrypoint= for the container?
(docker inspect image_name will show you)
that command ends and the container shuts down.

how do you debug that command ending? (normally without a container)