Before Docker we normally had a NFS server on a separate host(s) and then mounted it on nginx and app hosts, so that nginx instances could serve static files created by web app and app worker instances could process user uploads.

Migrating to Docker we would like to avoid installing NFS server/client on host machines (i.e. outside containers) but still have a way to sync/mount static files and user uploads between nginx and app servers.

For example, assume we have 2 nginx hosts (each of them runs nginx container), 3 web app hosts and 2 app worker hosts. Now we need a way to share static files of web application (sync each deploy) and user uploads with nginx and workers. How would you do this in 2017?

  • you can't have nfs mount's which exist in container only, as container uses host's kernel and NFS mounts exists in the kernel. – kofemann May 9 '17 at 6:03
  • I meant NFS outside and Docker volumes pointing to the mounts. – Andrey May 9 '17 at 11:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.