Skip to content

Commit 45a65ce

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

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/src/bootc-images.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,18 @@ 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. The labels on the files under `/sysroot/ostree` are
140+
also managed by bootc/ostree and should not be changed by external
141+
tools.
142+
143+
Most typically, you instead want to only relabel targeted subdirectories
144+
of `/etc` and `/var`. This can be done via a systemd unit, e.g.
145+
`ExecStart=restorecon -R -v /var/lib/mysql`.
146+
135147
### Toplevel directories
136148

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

0 commit comments

Comments
 (0)