You can exclude directories by adding the top-level excludes key to your Landofile and then running a lando rebuild. I also noticed that running tests (w/ database tables cleaned using DELETE statements between each test) against PostgreSQL image (postgres:11) is very slow with the Docker Preview on M1 MacBook Pro compared to running the tests against locally installed PostgreSQL, or even against the stable version running on Intel platform. As a result, we recommend you only exclude directories containing code you don't need to modify such as vendor or node_modules. docker-compose is trying to resolve localunixsocket.local. After digging into a while I figured out that the dns lookup was causing the issues. It was taking ages for the docker-compose commands to get executed.
The downside of this approach is that all "excluded" directories are decoupled from your host, meaning that you can no longer edit their contents from your host machine. I have been trying with Docker beta on Mac OS and was facing an issue with docker-compose. Depending on the amount of files you exclude, this can bring your application from ugh fml to pretty close open in new window to native speed. The tl dr is that users can now exclude certain directories from using the default Docker Desktop. My VPS costs 4.99 per month, so the cost of a new MacBook is equivalent to around 33 years of using VPS. New Apple computers are quite expensive, when I’m writing this (February 2022) you need to spend 1999 on the cheapest version of MacBook Pro 14. Note that the below configuration does not impact Linux users who already have "native" performance by default. There is another aspect worth considering, money. The good news is that as of Lando 3.0.8, we can offer an experimental, opt-in, performance optimization pathway to users on macOS or Windows. Also there is an important difference between Docker Toolbox & Docker for Mac. The solution is to use NFS to mount the Users directory.
In my case it depends on the default Virtualbox driver which uses to mount volumes. On macOS, minikube runs on a lot of virtualization technologies, but hyperkit is the easiest to use. so heres how storage goes os x -> virtualbox vm -> linux FS of choice -> aufs. Similarly, since Lando is built on top of these technologies, you likely have experienced them while running big sites on Lando as well despite the fact that we already optimize our app mounts. Laradock by itself has no reasons to work slow. That means you are installing docker on virtualbox. Usually, these performance issues manifest themselves in slow page load times, or exceptionally long cli operations like installing a dependency or clearing an application's cache. If you've ever tried to run a site with a shload of files using Docker Desktop for Windows or macOS then you've likely experienced some of the very well documented open in new window performance issues associated with doing so.