Skip to content

Commit f59d912

Browse files
committed
docs/filesystem: Mention toplevels and mountpoints
We want to be clear that toplevel directories for mountpoints need to be created in the container build. Also, this moves the transient root and stateoverlay to markdown level 2, where they should have been. Closes: #814 Signed-off-by: Colin Walters <[email protected]>
1 parent e805417 commit f59d912

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

docs/src/filesystem.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,26 @@ However, for some use cases, it may be easier to allow some level of mutability.
146146
There are two options for this, each with separate trade-offs: transient roots
147147
and state overlays.
148148

149-
#### Enabling transient root
149+
### Other toplevel directories
150+
151+
Creating other toplevel directories and content (e.g. `/afs`, `/arbitrarymountpoint`)
152+
or in general further nested data is supported - just create the directory
153+
as part of your container image build process (e.g. `RUN mkdir /arbitrarymountpoint`).
154+
These directories will be lifecycled with the container image state,
155+
and appear immutable by default, the same as all other directories
156+
such as `/usr` and `/opt`.
157+
158+
Mounting separate filesystems there can be done by the usual mechanisms
159+
of `/etc/fstab`, systemd `.mount` units, etc.
160+
161+
#### SELinux for arbitrary toplevels
162+
163+
Note that operating systems using SELinux may use a label such as
164+
`default_t` for unknown toplevel directories, which may not be
165+
accessible by some processes. In this situation you currently may
166+
need to also ensure a label is defined for them in the file contexts.
167+
168+
## Enabling transient root
150169

151170
This feature enables a fully transient writable rootfs by default.
152171
To do this, set the
@@ -161,7 +180,7 @@ write (transiently, i.e. until the next reboot) to all top-level directories,
161180
including `/usr` and `/opt`, with symlinks to `/var` for content that should
162181
persist.
163182

164-
#### Enabling state overlays
183+
## Enabling state overlays
165184

166185
This feature enables a writable overlay on top of `/opt` (or really, any
167186
toplevel or subdirectory baked into the image that is normally read-only).

0 commit comments

Comments
 (0)