I have changed existing IP of my production docker-machine on AWS (had to reuse elastic IP for something else), but I can't find any way to fix the URL of the machine to access it from my desktop.
(Additionally, I have to work on multiple computers (desktop and 2 laptops), and I need access to AWS docker-machine from all of them. I can't find any option to add existing docker-machine host; I spent 4 hours googling the docs, apparently there was driver=none option, but now it is undocumented or broken. Isn't accessing the docker-machine VM from multiple clients a very basic requirement?)
when you run docker-machine ip <name>
do you get the new IP or the old IP?
The old one. And if I change it in .docker/machine/machines/[name]/config.json, it doesn't help.
(I changed the IP again in config.json, rebooted and it did help — however, it complained that the certificates were valid for the old IP and I have to regenerate them and restart all my containers. In production, this might not be the best way).
How about adding an option for allowing machine to pick an Elastic IP, if available, and use it when creating the EC2 instance? So when an user is about to create a an EC2 instance using docker-machine he/she might do something like:
docker-machine create --driver amazonec2 --use-elastic-ip kvstore
@yoanisgil as far as I can tell, AWS does not support creating an instance directly with an elastic ip. You would first have to launch the instance, then associate the elastic ip with it. I opened #3383 to see if that's a blocker to supporting this inside the aws driver.
+1 for being able to create an AWS docker machine with an elastic IP already assigned
This does seem to be a problem. Lots of things might change for the AWS EC2 host/server/VM/Instance in addition to the IP Address, e.g. Instance Type, AMI Name, Private IP, AWS SSH Key, etc. Would it be possible to have a command: docker-machine update {machine-name}. It would ask all the same questions and regenerate certificates, it just wouldn't create the VM at AWS.
+1 for this feature on the create command
+1 for this feature.
Most helpful comment
How about adding an option for allowing machine to pick an Elastic IP, if available, and use it when creating the EC2 instance? So when an user is about to create a an EC2 instance using docker-machine he/she might do something like: