feat: manage custom docker caps

This commit is contained in:
vincent 2022-11-27 08:41:53 +01:00
parent f8095142e7
commit 46d51ac70c
3 changed files with 18 additions and 0 deletions

View File

@ -23,3 +23,4 @@ nomad_host_networks:
# reserved_ports: # reserved_ports:
nomad_allow_privileged: False nomad_allow_privileged: False
nomad_plugins_podman: False nomad_plugins_podman: False
nomad_docker_allow_caps: []

View File

@ -41,6 +41,9 @@ plugin "docker"{
enabled = true enabled = true
selinuxlabel = "z" selinuxlabel = "z"
} }
{%if 'nomad_docker_allow_caps' %}
allow_caps = [ "{{nomad_docker_default_caps|join('","')}}","{{nomad_docker_allow_caps|join('","')}}"]
{% endif %}
allow_privileged = {{ nomad_allow_privileged|lower }} allow_privileged = {{ nomad_allow_privileged|lower }}
} }
} }

View File

@ -0,0 +1,14 @@
nomad_docker_default_caps:
- audit_write
- chown
- dac_override
- fowner
- fsetid
- kill
- mknod
- net_bind_service
- setfcap
- setgid
- setpcap
- setuid
- sys_chroot