SQLite WAL Mode Across Docker Containers Sharing a Volume

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Engineers can confidently run multiple SQLite processes in separate Docker containers sharing one volume, because WAL shared memory works across containers on the same host.

Read this as

SQLite is a popular small database, and WAL mode lets several programs read and write it at the same time. Simon Willison tested whether two Docker containers (isolated software environments) sharing one storage volume on the same Mac could safely use it together. They could: changes appeared in real time and the shared memory file .db-shm worked as intended.

Teams that split backend services into separate Docker containers often avoid SQLite, fearing its write-ahead-logging shared memory breaks across container boundaries. Willison's 7 April 2026 experiment, using Docker Desktop for macOS with a named volume, shows this fear is unfounded on a shared host. The practical gain is simpler architectures, though the test covers only one host setup.

Willison tested WAL mode with two Docker containers on one host sharing a named volume under Docker Desktop for macOS. Because containers share the same kernel and filesystem semantics, WAL's shared memory (the .db-shm file, memory-mapped) coordinates correctly, with database changes propagating in real time. The test was prompted by a Hacker News discussion; no benchmarks or other platforms were reported.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

SQLite Docker Docker Desktop for macOS WAL mode Datasette Hacker News Simon Willison

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading