mirror of
https://github.com/containers/podman.git
synced 2025-10-13 01:06:10 +08:00
compat API: allow MacAddress on container config
docker-compose sets the mac address in the container config and not the network endpoint config. This is ugly when you have more than one network, in this case docker just chooses the first network. Fixes #16411 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -2,6 +2,7 @@ version: "3.2"
|
||||
services:
|
||||
test:
|
||||
image: alpine
|
||||
mac_address: 32:b5:b2:55:48:72
|
||||
networks:
|
||||
net1:
|
||||
ipv4_address: 10.123.0.253
|
||||
|
@ -5,4 +5,6 @@ if [ "$TEST_FLAVOR" = "compose_v2" ]; then
|
||||
ctr_name="ipam_set_ip-test-1"
|
||||
fi
|
||||
podman container inspect "$ctr_name" --format '{{ .NetworkSettings.Networks.ipam_set_ip_net1.IPAddress }}'
|
||||
like "$output" "10.123.0.253" "$testname : ip address is set"
|
||||
is "$output" "10.123.0.253" "$testname : ip address is set"
|
||||
podman container inspect "$ctr_name" --format '{{ .NetworkSettings.Networks.ipam_set_ip_net1.MacAddress }}'
|
||||
is "$output" "32:b5:b2:55:48:72" "$testname : mac address is set"
|
||||
|
Reference in New Issue
Block a user