I have a docker container running mongoDB that is failing to start. I've searched and realised that this is caused due to an issue with mongoDB failing to start in the container.
After searching, the solution to make mongoDB work again seems to be quite simple, as seen in this response: MongoDB Failing to Start - ***aborting after fassert() failure. Apparently, all I have to do is delete the file that is causing mongoDB to crash: /tmp/mongodb-27017.sock.
I've seen responses where you can access the shell in the container docker exec -t -i mycontainer /bin/bash
, however the container has to be running.
Is there a way to delete the specific file if the container isn't running?