diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-09-11 11:00:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-11 11:00:11 -0400 |
commit | 881f2dfe9221a65b0bcac8682dc3add12bfa6077 (patch) | |
tree | ed8728e6298aa53948101ab6b90c306712d171cd /cmd/podman | |
parent | d8a0db2e0b6de41731dc867c1cadaabbdda97624 (diff) | |
parent | 6b0864434ad2780160c06ba607c76b0325b60175 (diff) | |
download | podman-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 'cmd/podman')
-rw-r--r-- | cmd/podman/images/build.go | 3 | ||||
-rw-r--r-- | cmd/podman/root.go | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go index 923109b15..ff5c6ec09 100644 --- a/cmd/podman/images/build.go +++ b/cmd/podman/images/build.go @@ -386,6 +386,9 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil } containerConfig := registry.PodmanConfig() + for _, arg := range containerConfig.RuntimeFlags { + runtimeFlags = append(runtimeFlags, "--"+arg) + } if containerConfig.Engine.CgroupManager == config.SystemdCgroupsManager { runtimeFlags = append(runtimeFlags, "--systemd-cgroup") } diff --git a/cmd/podman/root.go b/cmd/podman/root.go index 6cf369f0a..60725b111 100644 --- a/cmd/podman/root.go +++ b/cmd/podman/root.go @@ -273,6 +273,7 @@ func rootFlags(cmd *cobra.Command, opts *entities.PodmanConfig) { pFlags.StringVar(&opts.RegistriesConf, "registries-conf", "", "Path to a registries.conf to use for image processing") pFlags.StringVar(&opts.Runroot, "runroot", "", "Path to the 'run directory' where all state information is stored") pFlags.StringVar(&opts.RuntimePath, "runtime", "", "Path to the OCI-compatible binary used to run containers, default is /usr/bin/runc") + pFlags.StringArrayVar(&opts.RuntimeFlags, "runtime-flag", []string{}, "add global flags for the container runtime") // -s is deprecated due to conflict with -s on subcommands pFlags.StringVar(&opts.StorageDriver, "storage-driver", "", "Select which storage driver is used to manage storage of images and containers (default is overlay)") pFlags.StringArrayVar(&opts.StorageOpts, "storage-opt", []string{}, "Used to pass an option to the storage driver") |