How to prevent MongoDB Container from restarting after initialization?

Hello, i’m trying to create custom image to initialize Percona MongoDB Server using MongoDB’s entrypoint feature.
However, mongod services always restarts after the initialization process has been completed.

{“t”:{“$date”:“9999-99-99T99:499:99.999+99:99”},“s”:“I”, “c”:“CONTROL”, “id”:99999, “ctx”:“SignalHandler”,“msg”:“Shutting down”,“attr”:{“exitCode”:0}}
MongoDB init process complete; ready for start up.

This behaviour effectively destroys all of the initialized data on inMemory Engine. Is there any option to prevent this behaviour? Thank you

1 Like