From 12424450800d89620be2178a5b49e229fbec6628 Mon Sep 17 00:00:00 2001 From: Marat Radchenko Date: Wed, 27 Mar 2024 11:25:09 +0300 Subject: [PATCH] Simplify handling of host_dns --- containerd/containerd.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/containerd/containerd.go b/containerd/containerd.go index 9dc7e81..da1f60f 100644 --- a/containerd/containerd.go +++ b/containerd/containerd.go @@ -264,8 +264,7 @@ func (d *Driver) createContainer(containerConfig *ContainerConfig, config *TaskC // Setup host DNS (/etc/resolv.conf) into the container. if config.HostDNS { - dnsMount := buildMountpoint("bind", "/etc/resolv.conf", "/etc/resolv.conf", []string{"rbind", "ro"}) - mounts = append(mounts, dnsMount) + opts = append(opts, oci.WithHostResolvconf) } // Setup "/secrets" (NOMAD_SECRETS_DIR) in the container.