A container's writable layer feels like a filesystem, and that's exactly the trap. Write a database into it, remove the container, and the data is gone — no warning, no recovery. If you want anything to survive docker rm, it has to live outside the container, and Docker gives you three ways to do that: named volumes, bind mounts, and tmpfs....