DEV Community

Jordan Bravo
Jordan Bravo

Posted on • Updated on

How to speed up Docker on MacOS

Problem: Containerization is a feature of the Linux kernel (namespaces + cgroups + chroot) and so MacOS and Windows must run a virtualized Linux environment to use Docker, which has a significant performance penalty.

Solution: To help mitigate this issue, Docker (the company) has some recommended configuration tweaks for optimizing performance on MacOS:

Step 1. In Docker Desktop Settings > General > Choose file sharing implementation for your containers. Select VirtioFS and restart Docker Desktop.

Image description

Step 2. If you’re using any bind mounts, add the delegated option when you specify the mount source and destination in the docker-compose.yml file, for example:

    image: my-image
    container_name: my-container
      - ./my-app:/app:delegated  # this is the relevant setting
Enter fullscreen mode Exit fullscreen mode


Top comments (0)