When a docker volume is shared across multiple containers and users are collaborating on same set of files, how does docker architecture manage the file locking for read and write. Our requirement is to lock the file for one user and keep it open to read for rest in the group in a real time environment similar to web conferencing of sharing screen one at a time. Can this be achieved using a docker plug-in? Thanks for your help.
It doesn’t. Imagine multiple copies of the same process running on the same local system with the same filesystem; the application needs to work out this locking for itself.
(Since it is, in fact, multiple copies of the same process on a shared local filesystem, normal things like flock(2) should work, though.)