如何正确设置docker-sync来排除文件夹

我试图设置docker同步排除我的应用程序/caching和应用程序/日志文件夹,但它不工作。

我试过的东西:

使用sync_excludes:['.idea','app / cache / ','app / logs / ']但它会被翻译成这样的东西

command unison -ignore='Name .idea' -ignore='Name app/cache/*' -ignore='Name app/logs/*' 

所以然后我尝试使用sync_args并像这样设置:

 sync_args: - "-debug verbose" - "-ignore='Path app/cache'" - "-ignore='Path app/logs'" command unison -ignore='Name .idea' -ignore='Name systems' \ -debug verbose -ignore='Path app/cache/*' -ignore='Path app/logs/*' 

看着日志,我可以看到这一点

 [unox][DEBUG]: recvCmd: DIR [unox][DEBUG]: sendCmd: OK [fswatch+] >> OK [pred] immutable 'app/cache' = false [pred] ignore 'app/cache/prod' = true [pred] ignorenot 'app/cache/prod' = false [ignore] buildUpdateChildren: ignoring path app/cache/prod 

但是,这仍然看到事件被触发,它仍然同步到我的主机。

 [pred] ignore 'app/cache/prod/annotations/5702f47f407ddb07532bfd60d8ea2919489ef4bc#__construct.cache.php' = false [pred] ignore 'app/cache/prod/annotations/f21b469a2214195ff16e2af43f249bdbfa245c25#findPublishedOr404.cache.php' = false 

任何人都知道我错过了什么?

我的最后一个版本是这样的:

 version: "2" options: # optional, activate this if you need to debug something, default is false # IMPORTANT: do not run stable with this, it creates a memory leak, turn off verbose when you are done testing verbose: true syncs: #IMPORTANT: ensure this name is unique dt-akeneo-unison-sync: notify_terminal: true # which folder to watch / sync from - you can use tilde (~), it will get expanded. Be aware that the trailing slash makes a difference # if you add them, only the inner parts of the folder gets synced, otherwise the parent folder will be synced as top-level folder src: './' # the files should be own by root in the target cointainer sync_userid: 1000 sync_strategy: 'unison' # optional, a list of regular expressions to exclude from the fswatch - see fswatch docs for details watch_excludes: ['\.git', '\.gitignore', '.*\.md'] sync_args: - "-debug verbose" #force Unison to choose the file with the later (earlier) modtime - "-ignore='Path app/cache'" - "-ignore='Path app/logs'" - "-ignore='Path .git'" - "-ignore='Path .git'" - "-ignore='Path vendor'" - "-ignore='Path upgrades'" - "-ignore='Path systems'" # optional: use this to switch to fswatch verbose mode watch_args: '-v' 

我的环境:{11:41}〜➭docker -v Docker版本17.09.0-ce,build afdb6d4

{11:42}〜➭docker-sync -v 0.4.6

SO:OSx 10.11.6

在/ Users / neisantos / src(hfs,local,nodev,nosuid,journaled,noowners,nobrowse)上使用https://gist.github.com/scottsb/479bebe8b4b86bf17e2d / dev / disk2s2创build的挂载文件系统上运行我的项目)