How to configure docker for mac in configuration files?

I’d like to script the installation and configuration of docker-for-mac.

I can “brew install” docker, however, unlike docker for linux, I couldn’t find a way to configure the new docker-for-mac via configuration files (such as daemon.json). So now I need to ask users to change the VM CPU and memory in the UI, add our private registry in the UI and restart the Docker VM.

Did I overlook something or it is not supported at the moment?

Thank you!

Hi,

Under mac the daemon.json is kinda hidden.

  1. goto ~/Library/Containers/com.docker.docker/Data/database
    there is an .git repository (.git)
  2. reset to HEAD git reset --hard
  3. now you have com.docker.driver.amd64-linux
  4. go into ~/Library/Containers/com.docker.docker/Data/database/com.docker.driver.amd64-linux/etc/docker there is your daemon.json

don’t forget to commit your changes otherwise it might be lost

cheers,

1 Like