Skip to content

Commit 484162b

Browse files
slonopotamusolljanat
authored andcommitted
Simplify handling of host_dns
1 parent 6491112 commit 484162b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

containerd/containerd.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,7 @@ func (d *Driver) createContainer(containerConfig *ContainerConfig, config *TaskC
276276

277277
// Setup host DNS (/etc/resolv.conf) into the container.
278278
if config.HostDNS {
279-
dnsMount := buildMountpoint("bind", "/etc/resolv.conf", "/etc/resolv.conf", []string{"rbind", "ro"})
280-
mounts = append(mounts, dnsMount)
279+
opts = append(opts, oci.WithHostResolvconf)
281280
}
282281

283282
// Setup "/secrets" (NOMAD_SECRETS_DIR) in the container.

0 commit comments

Comments
 (0)