79772590

Date: 2025-09-23 12:32:38
Score: 1
Natty:
Report link

Your data disappears because you’re running MongoDB with --rm, which deletes the container before it can flush data to disk. Also, show dbs won’t display your notes DB until it has real data written. To fix this, remove --rm from your docker run so the container shuts down cleanly, and always check with use notes; db.notes.find() instead of just show dbs. Also confirm your volume is mounted with docker volume inspect mongodb. This way, your data will persist across restarts.

Reasons:
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Moses