Closed marzelin closed 5 years ago
Switching to --verbose
mode showed what is causing the error:
.git/index.lock
is created when there's a change and immediately removed so when the program tries to access the file in a container it cannot find it and throws an error.
Is there a fix for this?
Hi Marcin! Thanks for reporting this! Do you know which software on your system makes git to constantly create and remove .git/index.lock file? It sounds like some other tool (e.g. plugin to your IDE/text editor) monitors git status.
Is there a fix for this?
So far I know only one solution that should fix this: I can implement ignore
CLI argument that will make docker-windows-volume-watcher to ignore any changes in given files. This will enable people experiencing this issue to run docker-windows-volume-watcher --ignore "*.git*"
to fix this problem.
It's probably vscode that constantly runs git status
to fetch any updates to git repo being done by other processes. Having ignore
option would be great.
Also I'm trying to run the watcher as a background process with nohup docker-volume-watcher.exe &
but it gets killed when a terminal is closed. Any advice on this?
Hi Marcin! I have release the new version 1.1.0 with exclude feature. Please update to latest vesrion:
pip install --upgrade docker-windows-volume-watcher
And then check if ignoring .git folder fixes this issue for you
docker-windows-volume-watcher -e "*.git*"
Also I'm trying to run the watcher as a background process with nohup docker-volume-watcher.exe & but it gets killed when a terminal is closed. Any advice on this?
Well, you probably can try to employ one of techniques described here https://superuser.com/questions/62525/run-a-batch-file-in-a-completely-hidden-way To be honest I haven't tried them.
Works like a charm. Thanks!
pip show docker-windows-volume-watcher
Version: 1.0.8pip show docker
Version: 3.5.0docker --version
Docker version 18.06.1-ce, build e68fc7awhen I run:
this is printed every second:
beside of this everything works as expected (a container is informed when a change is made).