github.com/docker/engine@v22.0.0-20211208180946-d456264580cf+incompatible/daemon/oci_utils.go (about) 1 package daemon // import "github.com/docker/docker/daemon" 2 3 import ( 4 "github.com/docker/docker/container" 5 specs "github.com/opencontainers/runtime-spec/specs-go" 6 ) 7 8 func setLinuxDomainname(c *container.Container, s *specs.Spec) { 9 // There isn't a field in the OCI for the NIS domainname, but luckily there 10 // is a sysctl which has an identical effect to setdomainname(2) so there's 11 // no explicit need for runtime support. 12 s.Linux.Sysctl = make(map[string]string) 13 if c.Config.Domainname != "" { 14 s.Linux.Sysctl["kernel.domainname"] = c.Config.Domainname 15 } 16 }