Commit 185e372
committed
Remove restriction on anonymous read-only volumes
Remove restriction on anonymouse read-only volumes.
This restriction is currently preventing the use of pre-populated volumes
that should be accessed in a read-only manner in a container
(e.g. an NFS volume containing data to be processed or served).
According to @neersighted the restriction may have originally been put
in place with the assumption that pre-populated volumes would be
exposed as a named volume by the volume driver.
In practice, NFS volumes are mounted using the docker `local` driver
by supplying driver opts. Example that fails when `readonly` is specified but works without:
```
docker run --rm -it \
--mount 'readonly,type=volume,dst=/data/dest,volume-driver=local,volume-opt=type=nfs,volume-opt=device=:/export/some-share,"volume-opt=o=nfsvers=4,addr=some.server"' \
debian
```
Fixes #452971 parent c64b781 commit 185e372Copy full SHA for 185e372
2 files changed
-7Lines changed: 0 additions & 7 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- daemon/volume/mounts
Expand file treeCollapse file tree
Open diff view settings
Collapse file
daemon/volume/mounts/linux_parser.go
Copy file name to clipboardExpand all lines: daemon/volume/mounts/linux_parser.go-3Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
112 | 112 | |
113 | 113 | |
114 | 114 | |
115 | | - |
116 | | - |
117 | | - |
118 | 115 | |
119 | 116 | |
120 | 117 | |
|
Collapse file
daemon/volume/mounts/windows_parser.go
Copy file name to clipboardExpand all lines: daemon/volume/mounts/windows_parser.go-4Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
270 | 270 | |
271 | 271 | |
272 | 272 | |
273 | | - |
274 | | - |
275 | | - |
276 | | - |
277 | 273 | |
278 | 274 | |
279 | 275 | |
|
0 commit comments