Skip to content

Commit d6fa8c3

Browse files
committed
Added a readme to mount hook
1 parent 5391794 commit d6fa8c3

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

src/mount/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# mount Hook for Sarus Suite
2+
3+
A small OCI hook that bind-mounts host files / directories /devices into the container without modifying the container image.
4+
5+
## How It Works
6+
7+
* Read mount definitions from the configuration
8+
* Perform bind mounts into the bundle before the container process starts
9+
10+
## Configuration
11+
12+
### Environment Variables
13+
14+
The hook is configured passing the host LDCONFIG path via environment variable:
15+
16+
| Variable | Description |
17+
|-----------------|-----------------------------------------|
18+
| `LDCONFIG_PATH` | Path to `ldconfig` on host |
19+
20+
### Enabling the Hook
21+
22+
When registered, the hook always runs.
23+
24+
~~~
25+
{
26+
"version": "1.0.0",
27+
"hook": {
28+
"path": "/scratch/local/podman-hooks/bin/mount_hook",
29+
"args": ["mount_hook",
30+
"--mount=type=bind,src=${HOME},dst=/mnt/hostbind,readonly"
31+
],
32+
"env": [
33+
"LDCONFIG_PATH=/sbin/ldconfig"
34+
]
35+
},
36+
"when": {
37+
"always": true
38+
},
39+
"stages": ["createContainer"]
40+
}
41+
~~~

0 commit comments

Comments
 (0)