Open twang2218 opened 8 years ago
To change the port you basically have 2 options :
--digitalocean-userdata
flag (more info here)--digitalocean-image
Hope that helps.
@bamarni cloud-init
file is a good tips, I will try that next time. My workaround is quite manually, as --digitalocean-port
is not working, I just created the host with normal port, and then ssh in the droplet, change the sshd_config
, then back to console, and change the ~/.docker/machine/machines/<name>/config.json
. It's not that convenient.
I think the --digitalocean-port
should utilize the cloud-init
file to specify the SSH port for the droplet, rather than we do it manually.
I think the --digitalocean-port should utilize the cloud-init file to specify the SSH port for the droplet, rather than we do it manually.
It seems out of the scope of docker machine, in a similar way it won't try to create the user from --digitalocean-ssh-user
if it doesn't exist.
Same here. I have to do this manually as I'm not using the default SSH on port 22
https://github.com/docker/machine/issues/3702#issuecomment-243049654
Would be nice to do something like this (port 2233 is my custom SSH port in the example)
eval "$(docker-machine env NODE1 -p2233)"
I tried to use port other than the default SSH port for Digital Ocean droplet by
--digitalocean-ssh-port 234
, however,docker-machine
failed to change the ports, and at the first creation, the SSH failed. Here is the log:It will retry again and again, until beyond the maximum retries:
After I logged into the created droplet, I found the SSH port is still
22
: