I’m trying to run an instance of technitium dns on a nomad cluster. everything works fine except dhcp, which mostly makes sense. However is there a way to get the dhcp broadcasts to the container? I’ve tried host networking mode, but I suspect I’m either not using it correctly and or completely misunderstanding the concept.
job "tsdns01" {
datacenters = ["dc1"]
type = "service"
group "network" {
count = 1
network {
mode = "host"
port "http" {
static = 5380
}
port "dns" {
static = 53
}
port "dhcp" {
static = 67
}
}
service {
name = "${NOMAD_JOB_NAME}-http"
port = "http"
provider = "consul"
}
task "server" {
driver = "docker"
resources {
cpu = 300
memory = 300
}
constraint {
attribute = "${meta.ns01}"
value = "true"
}
config {
image = "technitium/dns-server:latest"
force_pull = true
ports = ["http", "dns", "dhcp"]
volumes = [
"/mnt/nomad-vol/${NOMAD_JOB_NAME}/${NOMAD_TASK_NAME}:/etc/dns"
]
}
}
}
}