Volumes, Bind Mounts and tmpfs: Keeping Data in Containers
A container's writable layer goes away when the container is deleted; data that must persist belongs on a named volume, files from the host on a bind mount and temporary data on tmpfs. With real output we run BookstoreDb on a SQL Server 2025 container with a volume, keep the data across container deletion, back it up with BACKUP DATABASE and tar, fix the non-root SQL Server's Permission denied on a bind mount, use tmpfs for tests and avoid anonymous volumes.
14 Nov 2026
·
15 min
·
14