amazonec2 : Invalid command line. Found extra arguments [--amazonec2-open-port ]
Problem
In the amazonec2 driver documentation aws.md, --amazonec2-open-port option is mentioned but not supported in the create command.
Steps to Reproduce:
- Build docker-machine bianry from git repo
- Check version
./docker-machine -v
docker-machine version 0.7.0, build 85bef34
- Run machine create command
./docker-machine create --driver amazonec2 --amazonec2-region us-west-2 swarm-worker-1 --amazonec2-open-port 2377,7946,4789
Error :
Invalid command line. Found extra arguments [--amazonec2-open-port 2377,7946,4789]
Same issue is found in released version
~# docker-machine -v
docker-machine version 0.8.1, build 41b3b25
~# docker-machine create --driver amazonec2 --amazonec2-region us-west-2 swarm-worker-1 --amazonec2-open-port 2377,7946,4789
Invalid command line. Found extra arguments [--amazonec2-open-port ]
That documentation is on master branch.
If I recall correctly, the flag will be released with 0.9.0 and isn't in a released version yet.
Hi @nathanleclaire , Thanks for the clarification. In this flag can we specify protocol too ? I mean can we say open allow TCP and UDP on port 2377 ?
I think TCP is open by default and we designed flag to account for both protos, e.g. 2377/tcp and 53/udp. However if it's 2377 you're interested in specifically I think you only want TCP.
@nathanleclaire , Actually I am trying to open ports as per latest swarm mode document. https://docs.docker.com/engine/swarm/swarm-tutorial/#/open-ports-between-the-hosts
- TCP port 2377 for cluster management communications
- TCP and UDP port 7946 for communication among nodes
- TCP and UDP port 4789 for overlay network traffic
It would be nice if we open all these ports as part of default security group "docker-machine".