docker-py
docker-py copied to clipboard
Add equivalent of bind-recursive option to the Mount type class
With the recursive mount behavior change in Docker 25, it is not possible to make recursive mounts writable with the current API. Add the recursive option which is equivalent of bind-recursive in CLI. This also allows for setting the mount to be non-recursive (added earlier in API v1.41).
Ugly workarounds like this are needed to adjust the behavior now, it will be nice to have this in the standard Python API.
Related:
- https://github.com/moby/moby/issues/47158
- https://github.com/moby/moby/pull/45278
The branch is intentionally one commit behind the current main - the tests are currently broken there both locally and in CI, this way the tests pass. I can rebase the PR once it's resolved.