Merge pull request #7869 from dcantah/domainname-oci

oci: Add WithDomainname
This commit is contained in:
Fu Wei
2022-12-27 19:18:12 +08:00
committed by GitHub
3 changed files with 24 additions and 4 deletions

View File

@@ -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 {