Database in docker containers - readonly images vs durability
<p>Docker images are read only. When we instantiate a container from an image, the processes hosted in the container are able to write on disk, but those changes do not survive container restart. There are plenty of docker containers hosting databases services like Sql Server:
<a href="https://hub.docker.com/r/microsoft/mssql-server-windows/" rel="nofollow noreferrer">https://hub.docker.com/r/microsoft/mssql-server-windows/</a></p>

<p><strong>Doesn't the read only nature of Docker images defeat the purpose of durable databases?</strong> What do I see wrong?</p>

<p>Btw, I see great usability of this read-only nature in automated tests (no need to roll back), but that is not the primary use of a db.</p>