Merge pull request #26577 from Microsoft/jjh/fstabmount
Windows: Move to fstab options as per OCI Upstream-commit: b72c7f74a616a52a52843cf5b295962845be3ba3 Component: engine
This commit is contained in:
@ -129,7 +129,13 @@ func (clnt *client) Create(containerID string, checkpoint string, checkpointDir
|
||||
mds[i] = hcsshim.MappedDir{
|
||||
HostPath: mount.Source,
|
||||
ContainerPath: mount.Destination,
|
||||
ReadOnly: mount.Readonly}
|
||||
ReadOnly: false,
|
||||
}
|
||||
for _, o := range mount.Options {
|
||||
if strings.ToLower(o) == "ro" {
|
||||
mds[i].ReadOnly = true
|
||||
}
|
||||
}
|
||||
}
|
||||
configuration.MappedDirectories = mds
|
||||
|
||||
|
||||
@ -101,11 +101,11 @@ type Mount struct {
|
||||
Destination string `json:"destination"`
|
||||
// Type specifies the mount kind.
|
||||
Type string `json:"type"`
|
||||
// Source specifies the source path of the mount. In the case of bind mounts
|
||||
// this would be the file on the host.
|
||||
// Source specifies the source path of the mount. In the case of bind mounts on
|
||||
// Linux based systems this would be the file on the host.
|
||||
Source string `json:"source"`
|
||||
// Readonly specifies if the mount should be read-only
|
||||
Readonly bool `json:"readonly"`
|
||||
// Options are fstab style mount options.
|
||||
Options []string `json:"options,omitempty"`
|
||||
}
|
||||
|
||||
// HvRuntime contains settings specific to Hyper-V containers
|
||||
|
||||
Reference in New Issue
Block a user