简体   繁体   中英

docker-machine to connect with external host

I'm using docker-machine v0.2 and I have two host(hostA, hostB) with OS Ubuntu 14.04. Then I was follow the official doc to install and use docker-machine.Finally After initial steps I have installed on my hostA: docker and docker-machine.

When I use example of driver virtualbox( docker-machine create --driver virtualbox dev ) all it's fine. I have one virtual machine with boot2docker named "dev" as follow:

docker-machine ls
NAME   ACTIVE   DRIVER       STATE     URL                         SWARM
dev             virtualbox   Running   tcp://192.168.99.101:2376   

Then I try to provision docker on hostB but I can't found the right way to do it. Anyone know how do it? It's possible use docker-machine to provision external host without cloud provider driver.

You must upgrade docker-machine to version docker-machine 0.3.0 which include generic driver.

Then you may use like this:

docker-machine create --driver generic --generic-ip-address some-ip --generic-ssh-user some-user dev

there are more parameters present in docker-machine documentation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM