summaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-03-11 07:56:50 -0700
committerGitHub <noreply@github.com>2019-03-11 07:56:50 -0700
commit8656d2d887b32c320b4dd453314ce95cd9cad6a5 (patch)
treed00e9aa4c6b4eb465d880c1fdd90bb13ac2210a1 /libpod/options.go
parent9b42577c322b74906d4dfa64926d9f187e2e2976 (diff)
parente02393ba700907ae193190f7335d3f2ec83c442a (diff)
downloadpodman-8656d2d887b32c320b4dd453314ce95cd9cad6a5.tar.gz
podman-8656d2d887b32c320b4dd453314ce95cd9cad6a5.tar.bz2
podman-8656d2d887b32c320b4dd453314ce95cd9cad6a5.zip
Merge pull request #2538 from giuseppe/slirp4netns-path
libpod: allow to configure path to the slirp4netns binary
Diffstat (limited to 'libpod/options.go')
-rw-r--r--libpod/options.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go
index 5ad2824d9..64b425c57 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -193,6 +193,20 @@ func WithConmonEnv(environment []string) RuntimeOption {
}
}
+// WithNetworkCmdPath specifies the path to the slirp4netns binary which manages the
+// runtime.
+func WithNetworkCmdPath(path string) RuntimeOption {
+ return func(rt *Runtime) error {
+ if rt.valid {
+ return ErrRuntimeFinalized
+ }
+
+ rt.config.NetworkCmdPath = path
+
+ return nil
+ }
+}
+
// WithCgroupManager specifies the manager implementation name which is used to
// handle cgroups for containers.
// Current valid values are "cgroupfs" and "systemd".