diff options
Diffstat (limited to 'libpod/options.go')
-rw-r--r-- | libpod/options.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go index 8a12c61e4..1fe472ccc 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -250,6 +250,21 @@ func WithNoPivotRoot(noPivot bool) RuntimeOption { } } +// WithCNIDirs sets the CNI configuration and network plugin directories used by +// the CNI network plugins +func WithCNIDirs(cniConfigDir, cniPluginDir string) RuntimeOption { + return func(rt *Runtime) error { + if rt.valid { + return ErrRuntimeFinalized + } + + rt.config.CNIConfigDir = cniConfigDir + rt.config.CNIPluginDir = cniPluginDir + + return nil + } +} + // Container Creation Options // WithShmDir sets the directory that should be mounted on /dev/shm |