1
0
Fork 0
containerctl/example.container
Enno Tensing 4ce53cb20b
example.container: Update example config with volume mount options
Volumes can be mounted with some different flags or no flags at all.
Since converting the string into an object would be overkill, as most of
the time the default options should suffice, and branching in
Volumes.from_json() to handle both strings and objects is also no the
cleanest method, implement it by using what already exists. Mount points
are not checked by the script, so the mount options can just be added to
the CONTAINER-DIR part of the volume config.

Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-29 09:50:56 +02:00

52 lines
933 B
Text

{
"name": "example-container",
"image": {
"registry": "registry.opensuse.org",
"image": "nginx",
"tag": "latest"
},
"privileged": false,
"read_only": false,
"replace": false,
"pull_policy": "always",
"restart": "always",
"network": {
"mode": "podman1",
"options": []
},
"dns": {
"search": "internal.contenso.com",
"servers": [ "1.1.1.1", "1.0.0.1" ]
},
"ports": {
"tcp": [ "53", "80", "443" ],
"udp": [ "53", "443" ]
},
"env": {
"FOO": "BAR",
"MAN_WIDTH": "42"
},
"secrets": {
"MySecret1": {
"type": "mount",
"options": "uid=0,gid=0,chmod=0777",
"target": "/var/run/secrets/MySecret1"
},
"MySecret2": {
"type": "mount",
"target": "/var/run/secrets/MySecret2"
},
"MySecret3": {
"type": "env",
"target": "MY_SECRET_3"
}
},
"volumes": {
"etc": "/etc:ro,noexec",
"var": "/var"
},
"capabilities": {
"add": [ "NET_RAW" ],
"drop": [ "CAP_SYS_ADMIN" ]
}
}