Skip to content

Commit cfb56bb

Browse files
committed
docs/bootc-images: Update for recent SELinux changes
We now do use the final tree for computing file contexts. Signed-off-by: Colin Walters <[email protected]>
1 parent 680b29f commit cfb56bb

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

docs/src/bootc-images.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,30 +102,29 @@ when the base image is built, label metadata is included
102102
in special metadata files in `/sysroot/ostree` that correspond
103103
to components of the base image.
104104

105-
When a bootc container is deployed, the system
106-
will use these default SELinux labels.
107-
Further non-OSTree layers will be dynamically labeled
108-
using the base policy.
109-
110-
Hence, at the current time it will *not* work to override
111-
the labels for files in derived layers by using e.g.
105+
File content in derived layers will be labeled using the default file
106+
contexts (from `/etc/selinux`). For example, you can do this (as of
107+
bootc 1.1.0):
112108

113109
```
114110
RUN semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?"
115111
```
116112

117113
(This command will write to `/etc/selinux/$policy/policy/`.)
118114

119-
It will *never* work to do e.g.:
115+
It will currently not work to do e.g.:
120116

121117
```
122118
RUN chcon -t foo_t /usr/bin/foo
123119
```
124120

125121
Because the container runtime state will deny the attempt to
126122
"physically" set the `security.selinux` extended attribute.
127-
In contrast per above, future support for custom labeling
128-
will by default be done by customizing the policy file_contexts.
123+
124+
In the future, it is likely however that we add support
125+
for handling the `security.selinux` extended attribute in tar
126+
streams; but this can only currently be done with a custom
127+
build process.
129128

130129
### Toplevel directories
131130

0 commit comments

Comments
 (0)