Container images: "nginx", "php:7.4-fpm" (memory_limit = 1024M), "mysql:8.0.23". My PC: i7-2600, 16GB, SSD. Loading pages is wildly slow. How can I speed up loading?
CodePudding user response:
If you are using Docker for Windows you should check the docs:
Share only the directories that you need with the container. File sharing introduces overhead as any changes to the files on the host need to be notified to the Linux VM. Sharing too many files can lead to high CPU load and slow filesystem performance.
Shared folders are designed to allow application code to be edited on the host while being executed in containers. For non-code items such as cache directories or databases, the performance will be much better if they are stored in the Linux VM, using a data volume (named volume) or data container.