İbrahim Gündüz
1 min readJan 10, 2020

--

Hello;
Thanks for your comment. In my case, I had created the machine by vagrant.

  1. Create a machine config
vagrant init ubuntu/xenial64

2. You can give a specific IP by uncommenting the following line in Vagrantfile OR…

config.vm.network “private_network”, ip: “192.168.33.10”

You can simply expose docker-engine port to the hose machine by the following line:

config.vm.network “forwarded_port”, guest: 2376, host: 2376

3. Run the following command to provision the vm with Docker: (use 127.0.0.1 instead of 192.168.33.100 if you haven’t give specific ip)

$ docker-machine create — driver generic \
— generic-ip-address 192.168.33.100 \
— generic-ssh-key .vagrant/machines/default/virtualbox/private_key \
— generic-ssh-user vagrant \
default

4. Tell to docker CLI use the docker engine which is in vm.

$ eval $(docker-machine default)

--

--

No responses yet