Default bind mounts to rshared not rprivate if not specified

It is quite confusing that from the host or another container that
binds `/containers` you cannot see the bind mounts, you have to enter
the container namespace. I think `rshared` is a better default. You
can always be explicit and add `private` if you want a private bind mount.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2018-03-26 13:54:49 -07:00
parent 749585dd13
commit 25cfac5463
No known key found for this signature in database
GPG Key ID: 609102888A2EE3F9

View File

@ -785,7 +785,8 @@ func ConfigInspectToOCI(yaml *Image, inspect types.ImageInspect, idMap map[strin
}
src := parts[0]
dest := parts[1]
opts := []string{"rw", "rbind", "rprivate"}
// default to rshared if not specified
opts := []string{"rw", "rbind", "rshared"}
if len(parts) == 3 {
opts = append(strings.Split(parts[2], ","), "rbind")
}