diff options
author | Qi Wang <qiwan@redhat.com> | 2020-08-21 13:56:50 -0400 |
---|---|---|
committer | Qi Wang <qiwan@redhat.com> | 2020-09-04 15:04:36 -0400 |
commit | 6b0864434ad2780160c06ba607c76b0325b60175 (patch) | |
tree | 6d352ca8204e5f7c5e2ff1266248ff35d1cb9a19 /libpod/options.go | |
parent | fa487a65220951e84779f200f48780666b4b9209 (diff) | |
download | podman-6b0864434ad2780160c06ba607c76b0325b60175.tar.gz podman-6b0864434ad2780160c06ba607c76b0325b60175.tar.bz2 podman-6b0864434ad2780160c06ba607c76b0325b60175.zip |
Add global options --runtime-flags
Add global options --runtime-flags for setting options to container runtime.
Signed-off-by: Qi Wang <qiwan@redhat.com>
Diffstat (limited to 'libpod/options.go')
-rw-r--r-- | libpod/options.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go index dccbb8741..577c03810 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -529,6 +529,17 @@ func WithEnableSDNotify() RuntimeOption { } } +// WithRuntimeFlags adds the global runtime flags to the container config +func WithRuntimeFlags(runtimeFlags []string) RuntimeOption { + return func(rt *Runtime) error { + if rt.valid { + return define.ErrRuntimeFinalized + } + rt.runtimeFlags = runtimeFlags + return nil + } +} + // Container Creation Options // WithShmDir sets the directory that should be mounted on /dev/shm. |