Trouble creating a replica set in MongoDB

I referring this to convert standalone mongo instance to a replica set, but I’m having some trouble here.

The application and database I’m using is running on docker containers and when I try to shutdown the mongo instance using db.adminCommand({"shutdown": "1"}), a few seconds later, I see the container up and running again. I guess one of the services of the application would’ve started it.

How do I configure this standalone instance to replica set in this case?