PRAGMA journal_mode=WAL; PRAGMA journal_mode=WAL;There are situations where you wouldn't want to, but they are probably very uncommon outside of the embedded computing world. Copying 3 files vs 1 is not a gigantic deal. Most of the time you aren't even moving a SQLite database around.
Of course, you'd be better off with WAL-based replication tech like litestream instead of plain file copies if you are truly worried about parallel operations during your file copies.
But that only works if all given processes run on the same physical machine, and not in containers/jails/VM.
The only namespace that matters here is the filesystem/mount namespace.
There is no reason you can’t access the same shared SQLite database on a common volume between containers on Linux for instance.
That is false. Whether you mmap the same file is dependent on the specific SELinux policy - which is by design, highly configurable.
I am also surprised/skeptical that the default configuration for those OSes for a shared volume/mount point would disallow mmaping by default (which is all that is required) - since what is the attack vector they’re preventing? If you can exfiltrate via memory you could just do so via read/write.
You'll either have to reduce safety and usability, or drop SQLite.