oci: Add WithDomainname
A domainname field was recently added to the OCI spec. Prior to this folks would need to set this with a sysctl, but now runtimes should be able to setdomainname(2). There's an open change to runc at the moment to add support for this so I've just left testing as a couple spec validations in CRI until that's in and usable. Signed-off-by: Danny Canter <danny@dcantah.dev>
This commit is contained in:
@@ -274,6 +274,14 @@ func WithHostname(name string) SpecOpts {
|
||||
}
|
||||
}
|
||||
|
||||
// WithDomainname sets the container's NIS domain name
|
||||
func WithDomainname(name string) SpecOpts {
|
||||
return func(_ context.Context, _ Client, _ *containers.Container, s *Spec) error {
|
||||
s.Domainname = name
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// WithMounts appends mounts
|
||||
func WithMounts(mounts []specs.Mount) SpecOpts {
|
||||
return func(_ context.Context, _ Client, _ *containers.Container, s *Spec) error {
|
||||
|
||||
Reference in New Issue
Block a user