Lost Docker Container with EC2 Restart

I was running a python script in EC2 within Docker container. I think the EC2 crashed because of ‘Out of memory’. SO I had to restart the EC2 else, I am unable to login. After restarting I couldn’t find my docker container. Any idea how to restore the docker?
I tried

docker ps -a

It returned nothing. Unable to check logs as well.
also when i checked inside /var/lib/docker/volumes I only see a .db file.
Any leads on how to recover or How to AVOID this in the future?

I think I used ‘-rm’ to initiate the docker. Looks like removing the ‘-rm’ flag will avoid removing the container during the EC2 restart