diff --git a/overlayUtils/overlayUtils.go b/overlayUtils/overlayUtils.go index 6764171..f8c2d59 100644 --- a/overlayUtils/overlayUtils.go +++ b/overlayUtils/overlayUtils.go @@ -117,3 +117,23 @@ func GetUpperLayer(mntOpts *MountOpts) string { } return "" } + +func GetWorkLayer(mntOpts *MountOpts) string { + opts := strings.Split(mntOpts.Opts, ",") + for _, opt := range opts { + if strings.HasPrefix(opt, "workdir=") { + return strings.TrimPrefix(opt, "workdir=") + } + } + return "" +} + +func GetVolatile(mntOpts *MountOpts) bool { + opts := strings.Split(mntOpts.Opts, ",") + for _, opt := range opts { + if opt == "volatile" { + return true + } + } + return false +}