Add capabilities nomad example job.

This commit is contained in:
Shishir Mahajan 2020-06-23 21:01:45 -07:00
parent d74c364fe5
commit 5b4aa4ec10
No known key found for this signature in database
GPG Key ID: D41782E7688DEC4A

View File

@ -0,0 +1,25 @@
job "capabilities" {
datacenters = ["dc1"]
group "capabilities-group" {
task "capabilities-task" {
driver = "containerd-driver"
config {
image = "docker.io/library/ubuntu:16.04"
command = "sleep"
args = ["600s"]
cap_add = ["CAP_SYS_ADMIN", "CAP_IPC_OWNER", "CAP_IPC_LOCK"]
cap_drop = ["CAP_CHOWN", "CAP_SYS_CHROOT", "CAP_DAC_OVERRIDE"]
}
resources {
cpu = 500
memory = 256
network {
mbits = 10
}
}
}
}
}