File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 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+ ~~~
You can’t perform that action at this time.
0 commit comments