summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/runtime_libpod.go
diff options
context:
space:
mode:
authorQi Wang <qiwan@redhat.com>2020-08-21 13:56:50 -0400
committerQi Wang <qiwan@redhat.com>2020-09-04 15:04:36 -0400
commit6b0864434ad2780160c06ba607c76b0325b60175 (patch)
tree6d352ca8204e5f7c5e2ff1266248ff35d1cb9a19 /pkg/domain/infra/runtime_libpod.go
parentfa487a65220951e84779f200f48780666b4b9209 (diff)
downloadpodman-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 'pkg/domain/infra/runtime_libpod.go')
-rw-r--r--pkg/domain/infra/runtime_libpod.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/domain/infra/runtime_libpod.go b/pkg/domain/infra/runtime_libpod.go
index a88347e24..f9b8106ef 100644
--- a/pkg/domain/infra/runtime_libpod.go
+++ b/pkg/domain/infra/runtime_libpod.go
@@ -156,6 +156,14 @@ func getRuntime(ctx context.Context, fs *flag.FlagSet, opts *engineOpts) (*libpo
options = append(options, libpod.WithRenumber())
}
+ if len(cfg.RuntimeFlags) > 0 {
+ runtimeFlags := []string{}
+ for _, arg := range cfg.RuntimeFlags {
+ runtimeFlags = append(runtimeFlags, "--"+arg)
+ }
+ options = append(options, libpod.WithRuntimeFlags(runtimeFlags))
+ }
+
// Only set this if the user changes storage config on the command line
if storageSet {
options = append(options, libpod.WithStorageConfig(storageOpts))