Default strategy for new Virtualization framework for Mac
chloerei opened this issue · 2 comments
Error/Feature Requestion/Docs
Feature Requestion
Docker Driver
Docker desktop for mac
Sync strategy
default
your docker-sync.yml
version: '2'
syncs:
app-sync:
src: './'
OS
MacOS 12.3
Description
I notice docker-sync check com.docker.hyperkit
process to detect docker_for_mac.
docker-sync/lib/docker-sync/dependencies/docker_driver.rb
Lines 5 to 9 in b4a1512
When open Use the new Virtualization framework
in docker desktop, it should be com.docker.virtualization
. docker-sync doesn't correctly detect docker_for_mac, then return unison for default strategy.
Set sync_strategy: native_osx
fix the problem, but this can cause problems for other OS.
Is native_osx strategy work for new virtualization framework? can it fix by this code?:
@docker_for_mac = Environment.system('pgrep -q com.docker.hyperkit') || Environment.system('pgrep -q com.docker.virtualization')
I do no longer have a Mac/MacOS and thus are hard able to work on that issue - but you already pinned it down fairly well.
The question is, does the new virtualization work the same way as the old one and thus mapping it on docker_desktop is the right way - i guess we will learn.
The code that needs to be fixed is https://github.com/EugenMayer/docker-sync/blob/ffc18dafe6e7602b06a8333e02db3cb6bbb7e0ed/lib/docker-sync/dependencies/docker_driver.rb#L8= as you already suggested - since we detect the OS prior this, i suppose this will be enough.
Are you willing to provide a pr and test it? Would be awesome