By bloo
I have some Docker swarm masters and agents I’ve created using my docker-machine client, but I want a way to allow a trusted colleague to attach his local docker-machine installation to the same hosts. Is this possible?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I have a Docker droplet that I made not through Docker Machine, but this worked for me, and it should work for your use case:
Docker Machine has a generic driver that you can use to connect to an existing Docker remote host (replace the stubbed placeholders with your info):
docker-machine create \
--driver=generic \
--generic-ip-address=IP_ADDRESS \
--generic-ssh-user=USERNAME \
--generic-ssh-key=PATH_TO_SSH_KEY \
--generic-ssh-port=PORT \
MACHINE_NAME
You need to be able to SSH in with the key you provide for it to connect. Also, you’ll need to make sure port 2376 is open (ufw allow 2376 in Debian/Ubuntu) and that you can use passwordless sudo (add %sudo ALL=(ALL) NOPASSWD:ALL to /etc/sudoers).
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.