Implications of exposing /var/lib/docker over NFS to serve hosts with limited memory Implications of exposing /var/lib/docker over NFS to serve hosts with limited memory docker docker

Implications of exposing /var/lib/docker over NFS to serve hosts with limited memory


The /var/lib/docker directory is designed to be exclusively accessed by a single daemon, and should never be shared with multiple daemons.

Having multiple daemons use the same /var/lib/docker can lead to many issues, and possible data corruption.

For example, the daemon keeps an in-memory state of which images are in use (by containers), and which ones not; multiple daemons using those image won't keep track of that (an image may be in use by another daemon), and remove the image while it's in use.

Docker also stores various other files in /var/lib/docker, such as a key/value store for user-defined networks, which is not designed to be accessed concurrently by multiple daemons.