summaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-11 11:00:11 -0400
committerGitHub <noreply@github.com>2020-09-11 11:00:11 -0400
commit881f2dfe9221a65b0bcac8682dc3add12bfa6077 (patch)
treeed8728e6298aa53948101ab6b90c306712d171cd /libpod/options.go
parentd8a0db2e0b6de41731dc867c1cadaabbdda97624 (diff)
parent6b0864434ad2780160c06ba607c76b0325b60175 (diff)
downloadpodman-881f2dfe9221a65b0bcac8682dc3add12bfa6077.tar.gz
podman-881f2dfe9221a65b0bcac8682dc3add12bfa6077.tar.bz2
podman-881f2dfe9221a65b0bcac8682dc3add12bfa6077.zip
Merge pull request #7403 from QiWang19/runtime-flag
Add global options --runtime-flags
Diffstat (limited to 'libpod/options.go')
-rw-r--r--libpod/options.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go
index 7eec530ea..61379710d 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -530,6 +530,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.