How to solve the extremely slow project access speed under docker volume shared files?

  docker, question


When the project root directory of nginx container is assigned to the file shared by volume, http request access is extremely slow (more than ten seconds).

Current solution:

Copying project files into the container file system (that is, the internal file system as a container) is very fast.

The problem caused by this is that the files cannot be synchronized. Is there any good solution?

Docker version:

Version 17.06.2-ce-mac27 (19124)

Php environment:


System version:

Linux php-fpm 4.9.41-moby #1 SMP Wed Sep 6 00:05:16 UTC 2017 x86_64 GNU/Linux

Host system:

OS X EI Capitan 10.11.6
 Processor i5
 Memory 8G
 Hard disk SSD.

1 The same problem occurred in vagrant, a colleague’s windows system.
Extremely slow is the native test under no load, only I have an http request.

Http request access is extremely slow (more than ten seconds)What kind of load is this? I used to do the same here before, but there was no such thing as what you said.