Project: [https://github.com/sstarcher/docker-awscli] (https://github.com/sstarcher/docker-awscli)
Docker image: [https://registry.hub.docker.com/u/sstarcher/aws-tools/] (https://registry.hub.docker.com/u/sstarcher/aws-tools/)
docker run -it sstarcher/aws-tools helpConfigures the ENI that has been attached as a secondary interface
#! /bin/bash
set -e
/usr/bin/ip link set eth1 up
until ip route | grep default | grep eth1
do
echo "Try again"
sleep 0.5
done
ip route delete $(ip route | grep default | grep eth1);
GATEWAY=$(route -n | grep 'UG[ \t]' | awk '{print $2}')
ip route add default via $GATEWAY dev eth1 table 11
PRIVATE_IP=$(ip addr | awk '/inet/ && /eth1/{sub(/\/.*$/,"",$2); print $2}')
ip rule add from $PRIVATE_IP lookup 11
Content type
Image
Digest
Size
29.2 MB
Last updated
over 8 years ago
docker pull sstarcher/aws-tools