Before Docker for Mac, with Docker Toolbox and boot2docker, I had this kind if issue often with plain docker containers. Hence I'm not so sure the issue is with Kubernetes. Maybe it's inherent with docker + non-privileged user + virtual machine mount. 需安装 Docker for Mac或者Docker for Windows,如果没有请下载下载 Docker CE最新版本 当前 master 分支已经在 Docker for Mac/Windows 18.09/18.06 (包含 Kubernetes 1.10.3) 版本测试通过,如果你希望使用 18.03 版本, 请使用下面命令切换 18.03 分支 git checkout 18.03. There are many various improvements you can make to Docker for Mac to fine-tune performance, especially when working with large application filesystems such as those with Magento or Zend Framework. Step 1: Computer, Cores & RAM I’m absolutely resolved that a dual-core machine with 8GB RAM will just simply not cut it. ![]() My MacBook Air just spins fans, and fswatch events get delayed or stop working just because there is not enough computing power to go around. Once you have (at the very least) a quad-core MacBook Pro with 16GB RAM and an SSD, go to Docker > Preferences > Advanced. Set the “computing resources dedicated to Docker” to at least 4 CPUs and 8.0 GB RAM. Step 2: Docker Disk Type Next, go to Disk settings. Be sure the “Disk image location” value ends with the file type “Docker.raw”. The new raw filesystem ensures you are using the latest image format for performance. If you don’t see this or instead see something like “qcow2”, edit the filePath property of the file ~/Library/Group Containers/group.com.docker/settings.json extension from.qcow2 to. Raw, and restart Docker for Mac. Next, set the Overlay2 Filesystem in Daemon > Vlc for mac download. Advanced. Basically, you want to add a property of 'storage-driver': 'overlay2'. For more information on this, see. Note that all previous containers, images and Docker data will be reset and lost with either of these changes, so it’s best to apply before doing any other tweaks or performance updates. ![]() Step 3: Disable Unneeded File Shares By default, Docker for Mac comes with /Users, /Volumes, /private, and /tmp directories available to bind mount into Docker containers. Remove all of these. Add the root location of where your website files and composer home are located. For me, this is /Users/myusername/Sites as well as /Users/myusername/.composer. These are most likely the only folders you need to bind-mount to Docker. This makes sure Docker is not unnecessarily listening for filesystem changes in other locations. Step 4: Use “delegated” Volume Mounts This is a, and isn’t nearly used enough. The “delegated” flag is the one you want to use. This postpones writes back to the host in order to achieve higher filesystem throughput. Enjoy your modified Docker setup! Hope you experience much better performance as Docker for Mac continues to get better each day.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |