diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-07-17 04:44:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-17 04:44:49 -0400 |
commit | d86bae2a01cb855d5964a2a3fbdd41afe68d62c8 (patch) | |
tree | b69b21c84a341626823eee106730134166e10b96 /libpod/options.go | |
parent | 0bd51819428e402599f681f273947c805f4641cf (diff) | |
parent | d35d8125bf0be2add82003de1a4b89a0594bb9a0 (diff) | |
download | podman-d86bae2a01cb855d5964a2a3fbdd41afe68d62c8.tar.gz podman-d86bae2a01cb855d5964a2a3fbdd41afe68d62c8.tar.bz2 podman-d86bae2a01cb855d5964a2a3fbdd41afe68d62c8.zip |
Merge pull request #6965 from giuseppe/followup-pr6324
allow switching of port-forward approaches in rootless/using slirp4netns
Diffstat (limited to 'libpod/options.go')
-rw-r--r-- | libpod/options.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go index b3c11ebc1..32748a3c1 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -1003,6 +1003,19 @@ func WithStaticIP(ip net.IP) CtrCreateOption { } } +// WithNetworkOptions sets additional options for the networks. +func WithNetworkOptions(options map[string][]string) CtrCreateOption { + return func(ctr *Container) error { + if ctr.valid { + return define.ErrCtrFinalized + } + + ctr.config.NetworkOptions = options + + return nil + } +} + // WithStaticMAC indicates that the container should request a static MAC from // the CNI plugins. // It cannot be set unless WithNetNS has already been passed. |