MGT Cloud Log is here!

File Synchronization on Mac

To work with an IDE like phpstorm or eclipse on your host system you need to sync your code into the container. The integrated file sharing solution from docker cannot be used because of very bad performance.

To have a good performance we need to sync the files from the host system into the container.

For the two way file-synchronization we use the great tool Unison.

Setup Unison on Mac

To work with Unison it's very important to have the right versions installed.

Please follow the instructions step by step.

Step 1: Download and Install Unision

Download and install Unision by Drag'n Drop into Application folder

Download Unsion

Step 2: Install Unison command-line tool

Click on "Yes" to install the Unison command-line tool

Unison command line tool

Step 3: Open terminal and install xcode, pip and macfsevents which are needed for unison-fsmonitor

xcode-select --install
sudo easy_install pip
sudo pip install macfsevents
sudo pip install watchdog

Step 4: Install unison-fsmonitor binary

sudo curl > /usr/local/bin/unison-fsmonitor && chmod 775 /usr/local/bin/unison-fsmonitor

Step 5: Create a file for each project you want to sync

In our example, we want to sync the files from our host system into the container from




For this we create the file:


with the following content:

#rm -rf /Users/$(whoami)/Library/Application\ Support/Unison/*
unison -repeat watch /Users/stefan/PhpstormProjects/magento2.mgt/ ssh://root@ -ui text

Make sure the file is executable.

To make it executable just run: chmod 775

Step 6: Start file-synchronisation

To start the file synchronisation execute the file


Unison Sync

Enter the password "root" to start the file-synchronization


If you see the error message "Fatal error: inconsistent state. The archive file is missing on some hosts" please do the following:

Unison Inconsistent State

1) Delete unison archives on host system with the following command

rm -rf /Users/$(whoami)/Library/Application\ Support/Unison/*

2) Delete unison archive in container

ssh root@ rm -rf /root/.unison

3) Start sync process again