A custom awscli image & bin script to attach a specified EIP to the instance running the container.
1.7K
This image simply has the awscli & jq installed and runs our custom entrypoint script.
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_REGION
AWS_EIP
Given an AWS credentials, region, and EIP, find the EIP allocation ID, find the instance ID of the EC2 instance running this container and attach the specified EIP to the instance.
Note we must run the container in --net=host mode or else the container cannot access the EC2 metadata running on the host, and we need that to extract the instance ID of the host.
docker run --net=host -it --rm -e AWS_DEFAULT_REGION='us-east-1' \
-e AWS_ACCESS_KEY_ID='$YOUR-KEY' \
-e AWS_SECRET_ACCESS_KEY='$YOUR-SECRET' \
-e AWS_EIP='$YOUR-EIP' \
particle/awscli:latest
Content type
Image
Digest
Size
30.1 MB
Last updated
over 8 years ago
docker pull particle/awscli