If you check Dockerfile from containers, for example fballiano/magento2-apache-php
you'll see that at the end of his file he adds the following command: while true; do sleep 1; done
Now, what I recommend, is that you do this
docker container ls --all | grep 127
Then, you will see if your docker image had an error, if it exits with 0, then it probably needs one of these commands that will sleep forever.