aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/outcome/spcontainer.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/outcome/spcontainer.go b/internal/outcome/spcontainer.go
index 0ad1de50..d9398d2c 100644
--- a/internal/outcome/spcontainer.go
+++ b/internal/outcome/spcontainer.go
@@ -290,7 +290,9 @@ func (s *spFilesystemOp) toContainer(state *outcomeStateParams) error {
if state.Container.Flags&hst.FDevice == 0 {
state.params.Remount(fhs.AbsDev, syscall.MS_RDONLY)
}
- state.params.Remount(fhs.AbsRoot, syscall.MS_RDONLY)
+ if !state.as.NoRemountRoot {
+ state.params.Remount(fhs.AbsRoot, syscall.MS_RDONLY)
+ }
state.params.Env = make([]string, 0, len(state.env))
for key, value := range state.env {