Skip to content

Commit bccebc8

Browse files
committed
images: Discuss /.autorelabel
Came up in chat. Signed-off-by: Colin Walters <[email protected]>
1 parent a99294f commit bccebc8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/src/bootc-images.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,17 @@ for handling the `security.selinux` extended attribute in tar
132132
streams; but this can only currently be done with a custom
133133
build process.
134134

135+
#### Forcing relabeling
136+
137+
Some distributions support a `/.autorelabel` file; this will not work
138+
on a bootc managed system where `/` is immutable state from the base
139+
image by default. Further, the labels on the object store are managed
140+
by bootc and should not generally be changed by external tooling.
141+
142+
Most typically, you instead want to only relabel targeted subdirectories
143+
of `/etc` and `/var`. This can be done via a systemd unit, e.g.
144+
`ExecStart=restorecon -R v /var/lib/mysql`.
145+
135146
### Toplevel directories
136147

137148
In particular, a common problem is that inside a container image,

0 commit comments

Comments
 (0)