Mount in runc contain PremountCmds and PostmountCmds fields.
Howerver, there are no corresponding fields in Mount of runtim-spec.
Mount hook is useful, I'd like to add it in runtime-spec, such as:
type Mount struct {
// Destination is the path where the mount will be placed relative to the container's root. The path and child directories MUST exist, a runtime MUST NOT create directories automatically to a mount point.
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 on
// Linux based systems this would be the file on the host.
Source string `json:"source"`
// Options are fstab style mount options.
Options []string `json:"options,omitempty"`
// Optional Command to be run before Source is mounted.
PremountCmds []Hook `json:"premount,omitempty"`
// Optional Command to be run after Source is mounted.
PostmountCmds []Hook `json:"postmount,omitempty"`
}
MountinrunccontainPremountCmdsandPostmountCmdsfields.Howerver, there are no corresponding fields in
Mountofruntim-spec.Mount hook is useful, I'd like to add it in
runtime-spec, such as: