forked from rosa/hakurei
cmd/app: additional bind types
This adds optional and device mount points. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -201,6 +201,20 @@ func parse(id string, base *check.Absolute, r io.Reader) (*hst.Config, error) {
|
||||
)
|
||||
continue
|
||||
|
||||
case "ro+":
|
||||
source, target, err := parsePair(value)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
c.Container.Filesystem = append(c.Container.Filesystem,
|
||||
hst.FilesystemConfigJSON{FilesystemConfig: &hst.FSBind{
|
||||
Target: target,
|
||||
Source: source,
|
||||
Optional: true,
|
||||
}},
|
||||
)
|
||||
continue
|
||||
|
||||
case "rw":
|
||||
source, target, err := parsePair(value)
|
||||
if err != nil {
|
||||
@@ -215,6 +229,20 @@ func parse(id string, base *check.Absolute, r io.Reader) (*hst.Config, error) {
|
||||
)
|
||||
continue
|
||||
|
||||
case "dev":
|
||||
source, target, err := parsePair(value)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
c.Container.Filesystem = append(c.Container.Filesystem,
|
||||
hst.FilesystemConfigJSON{FilesystemConfig: &hst.FSBind{
|
||||
Target: target,
|
||||
Source: source,
|
||||
Device: true,
|
||||
}},
|
||||
)
|
||||
continue
|
||||
|
||||
case "own":
|
||||
c.SessionBus.Own = append(c.SessionBus.Own, value)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user