File Synchronization on Windows
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 Windows
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 OpenSSH
Step 2: Download Unison
Download Unison and extract files to: C:\Program Files\unison
Step 3: Create a sync.bat 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:
setlocal set PATH=C:\Program Files\OpenSSH\bin;C:\Program Files\unison unison -repeat watch C:\Users\stefan\PhpstormProjects\magento2.mgt\ ssh://firstname.lastname@example.org//home/cloudpanel/htdocs/magento2.mgt/ -ui text
Step 4: Start file synchronization
To start the file synchronization open the PowerShell and run sync.bat file