mirror of
https://github.com/containers/podman-compose.git
synced 2025-04-11 19:18:28 +02:00
interface_name can be specified in net_config_
Signed-off-by: Jörn Hirschfeld <joern@hirschfeld.tech>
This commit is contained in:
parent
2f8ed2137c
commit
1cdc9e6552
@ -989,6 +989,7 @@ def get_net_args_from_networks(compose, cnt):
|
||||
default_net_name = default_network_name_for_project(compose, net_, is_ext)
|
||||
net_name = ext_desc.get("name") or net_desc.get("name") or default_net_name
|
||||
|
||||
interface_name = net_config_.get("x-podman.interface_name")
|
||||
ipv4 = net_config_.get("ipv4_address")
|
||||
ipv6 = net_config_.get("ipv6_address")
|
||||
# Note: mac_address is supported by compose spec now, and x-podman.mac_address
|
||||
@ -1006,6 +1007,8 @@ def get_net_args_from_networks(compose, cnt):
|
||||
mac_address = None
|
||||
|
||||
net_options = []
|
||||
if interface_name:
|
||||
net_options.append(f"interface_name={interface_name}")
|
||||
if ipv4:
|
||||
net_options.append(f"ip={ipv4}")
|
||||
if ipv6:
|
||||
|
Loading…
Reference in New Issue
Block a user