network: document ports and macvlan interaction

The network backend will ignore ports for macvlan and ipvlan networks so
they do not do anything. No warning or error is shown because containers
may be later connected to a bridge network in which case they would be
useful.

Fixes #17927

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2023-10-19 13:04:15 +02:00
parent 30b14b33ae
commit ca9efb0cda
2 changed files with 6 additions and 0 deletions

View File

@ -21,3 +21,6 @@ Host port does not have to be specified (e.g. `podman run -p 127.0.0.1::80`).
If it is not, the container port is randomly assigned a port on the host.
Use **podman port** to see the actual mapping: `podman port $CONTAINER $CONTAINERPORT`.
Note that the network drivers `macvlan` and `ipvlan` do not support port forwarding,
it will have no effect on these networks.

View File

@ -43,6 +43,9 @@ under the `[network]` section.
The name of the plugin can then be used as driver to create a network for your plugin.
The list of all supported drivers and plugins can be seen with `podman info --format {{.Plugins.Network}}`.
Note that the `macvlan` and `ipvlan` drivers do not support port forwarding. Support for port forwarding
with a plugin depends on the implementation of the plugin.
#### **--gateway**=*ip*
Define a gateway for the subnet. To provide a gateway address, a