From e903eaa7d5b4593a0129f7c1d21e47c25607d707 Mon Sep 17 00:00:00 2001 From: Ville Korhonen Date: Mon, 19 Mar 2018 10:37:04 +0200 Subject: [PATCH] Add Docker support If provider is Docker, we add public_address from provider to list of valid IPs. --- lib/vagrant-hostsupdater/HostsUpdater.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/vagrant-hostsupdater/HostsUpdater.rb b/lib/vagrant-hostsupdater/HostsUpdater.rb index 1b8c284..dee6ede 100644 --- a/lib/vagrant-hostsupdater/HostsUpdater.rb +++ b/lib/vagrant-hostsupdater/HostsUpdater.rb @@ -23,6 +23,9 @@ def getIps if @machine.provider_name == :lxc ip = @machine.provider.capability(:public_address) ips.push(ip) + elsif @machine.provider_name == :docker + ip = @machine.provider.capability(:public_address) + ips.push(ip) end return ips