News for hackers. Stuff that matters.
Re:How to Corrupt an SQLite Database File by davepeck on Saturday April 30, 2022 @09:41AM (#31216015)
I recently saw SQLite used (and written to) in a Docker container, with the database file on a mounted volume.

That made me nervous!

I don't know enough about how Docker implements volumes under the hood to know how likely (or not) it is to break filesystem behavior that SQLite depends on for its transactional guarantees.

Perhaps someone here does?

Re:How to Corrupt an SQLite Database File by ktaylora on Saturday April 30, 2022 @09:50AM (#31216074)
I've used mounted volumes in docker for high-traffic postgresql databases and they've held up nicely. Should test this with SQLite, but I imagine it would perform just fine.
Re:How to Corrupt an SQLite Database File by rfoo on Saturday April 30, 2022 @10:09AM (#31216191)
Volumes are implemented with bind mount and it breaks almost nothing. No need to be nervous.
Re:How to Corrupt an SQLite Database File by Too on Sunday May 01, 2022 @01:09AM (#31222364)
Half of the universe nowadays run on containers with volume mounts. No need to be worried about it being a container per se.

What you should worry about though is the underlying volume driver and its storage type. Volumes can be simple bind mounts to your local disk, being more or less identical to no container. But volumes can also be attached straight to a network disk, where same dangers apply as if you would have mounted that network disk on host.

Re:How to Corrupt an SQLite Database File by andix on Saturday April 30, 2022 @12:56PM (#31217364)
As long as you’re not using docker for windows you should be fine. Docker desktop for windows uses a network share, to connect the Windows filesystems to the Linux docker system.

Volumes are made exactly for holding databases. And also bind mounts should work without any issue in most configurations.

But if there is some kind of network/virtualization between the physical disk and the container, you should investigate it in more detail.