I have MongoDB as docker container When I restarted the server and tried to start the container it kept restarting forever.
I got the container log as follows
The main problem is
Failed to unlink socket file /tmp/mongodb-27017.sock Operation not permitted
I found many solutions to this problem, but all of them are based on the idea that I'm using the mongod service, which isn't my case.
I'm using a docker container and I can't run commands on this container until it is running. Sadly this error doesn't let the container start and keeps restarting.
I found the issue on the official bug tracker of MongoDB since version 3.6, but also it doesn't have any solution.
I also found a similar question on DigitalOcean support with no luck to find a solution.