Closed RolandMay closed 6 years ago
@merofeev I created this issue with @RolandMay and just noticed that it is a duplicate of #8. Let me know if we can help by creating a PR.
Hi @ArneZsng , @RolandMay ! Thanks for suggesting the solution and sorry for delay with response (I'm currently on vacation). If you could contribute PR, this will be great! If you decide to do it let me suggest a few things:
exec_run
we can set minimum version of docker package to 3.0.0 in both requirements.txt
and setup.py
exec_run
and show some warning message to user in case we failed to execute chmod
or stat
Should be fixed by #10
Issue
I received the following error when watching local file changes while running under docker v3.0.0:
Docker version (
pip show docker
):Solution
Calling
output
onpermissions
solves the issue for docker >=3.0.0.docker_volume_watcher (https://github.com/merofeev/docker-windows-volume-watcher/blob/master/docker_volume_watcher/container_notifier.py#L66)
The cause seems to be that the output of
exec_run
changed to an ExecResult instead of a string with the version bump to 3.0.0: https://github.com/docker/docker-py/blob/05d34ed1fbaa8233a4cf51a0f52b67aef99a9521/docker/models/containers.py#L129.Ideally, permissions is checked for its type before calling decode on it.