aboutsummaryrefslogtreecommitdiffhomepage
path: root/hst/container.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-01 04:10:33 +0900
committerOphestra <cat@gensokyo.uk>2025-08-01 04:21:54 +0900
commit387b86bcdd7798a149ba2349cdf2a699f05cefe5 (patch)
treeede8a378bb00664ba38ce4619e03f72507d7b415 /hst/container.go
parent4e856438656ea0a1b30d52975f6b5415568df9a8 (diff)
app: integrate container autoroot
Doing this instead of mounting directly on / because it's impossible to ensure a parent is available for every path hakurei wants to mount to. This situation is similar to autoetc hence the similar name, however a symlink mirror will not work in this case. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'hst/container.go')
-rw-r--r--hst/container.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/hst/container.go b/hst/container.go
index c385344c..56229929 100644
--- a/hst/container.go
+++ b/hst/container.go
@@ -45,10 +45,17 @@ type (
// create symlinks inside container filesystem
Link [][2]string `json:"symlink"`
+ // automatically bind mount top-level directories to container root;
+ // the zero value disables this behaviour
+ AutoRoot string `json:"auto_root,omitempty"`
+ // extra flags for AutoRoot
+ RootFlags int `json:"root_flags,omitempty"`
+
// read-only /etc directory
Etc string `json:"etc,omitempty"`
// automatically set up /etc symlinks
AutoEtc bool `json:"auto_etc"`
+
// cover these paths or create them if they do not already exist
Cover []string `json:"cover"`
}