Skip to content

Example how to speed up Docker for Mac using Mutagen.

Notifications You must be signed in to change notification settings

Kwadz/speed-docker-for-mac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to speed up Docker for Mac?

It's a known issue that Docker for Mac is slow when using shared volumes containing a big amount of files, see docker/for-mac#77.

So, some workarounds came like :cached and docker-sync. However it's not totally satisfactory because it's still slow compared to native and docker-sync consumes a lot of resources when syncing.

That being said, there is a good alternative, not to say perfect, which is Mutagen. A benchmark is available here. It's almost as fast as native shared volumes with Linux!

This repository shows a configuration with a simple PHP project (Symfony 5 based on symfony-5-docker) but it can be used for any type of project in any language.

Enjoy!

1. Install Mutagen

brew install mutagen-io/mutagen/mutagen

2. Build the containers

docker-compose -f docker-compose.yml -f docker-compose.mac.yml up -d

3. Synchronise the files

At the project root directory, execute:

mutagen project start

Note

When using a non-root user in the container you can simply add the following in mutagen.yml:

  codebase:
    # ...
    configurationBeta:
      permissions:
        defaultFileMode: 644
        defaultDirectoryMode: 755
        defaultOwner: "myuser"
        defaultGroup: "myuser"

About

Example how to speed up Docker for Mac using Mutagen.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •