-
Notifications
You must be signed in to change notification settings - Fork 657
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix submounts of /dev being read-only with Docker 25+ (#4997)
As described in #4996, Docker 25+ changes made sub-mounts of the /dev filesystem to be mounted read-only. Revert to the previous behavior by adjusting the ReadOnlyNonRecursive option. Cleaner way would be to upstream support for setting this option via Mount class arguments, so this change is meant to be rather a hotfix for the issue. Even better approach would be mounting /dev non-recursively, and taking care of creating all necessary filesystems when creating containers in Supervisor.
- Loading branch information
Showing
5 changed files
with
17 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
"""Docker tests.""" | ||
from docker.types import Mount | ||
|
||
# dev mount with equivalent of bind-recursive=writable specified via dict value | ||
DEV_MOUNT = Mount(type="bind", source="/dev", target="/dev", read_only=True) | ||
DEV_MOUNT["BindOptions"] = {"ReadOnlyNonRecursive": True} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters