- Outside ENV strings are frozen:
Actually, it's a guide to setup docker macvlan network and it can be used to attach static ip to container on public/local network.
docker network create -d macvlan --subnet=$SUBNET --gateway=$GATEWAY_IP -o parent=eth0 public
$SUBNET - your public network subnet
$GATEWAY_IP - your public network gateway
This guide assumes you've configured your ENI inside linux instance. After you've assigned second ip address to your ENI in the AWS console, you need to reconfigure your interface inside intance.
Assume your interface name: eth1 Assume your second ip: $second_ip From the guide, mentioned above, the content of /etc/network/interfaces.d/eth1.cfg should look like:
auto eth1 iface eth1 inet static address $your_ip_addr