From 6f578590a934cc35c977d15d5115274464340bc6 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Thu, 9 Mar 2017 09:23:25 -0800 Subject: [PATCH] Skip forwarded port if disabled in docker provider --- plugins/providers/docker/action/create.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/providers/docker/action/create.rb b/plugins/providers/docker/action/create.rb index 6b4122693..61afc24b5 100644 --- a/plugins/providers/docker/action/create.rb +++ b/plugins/providers/docker/action/create.rb @@ -129,6 +129,9 @@ module VagrantPlugins # Don't include SSH if we've explicitly asked not to next if options[:id] == "ssh" && !include_ssh + # Skip port if it is disabled + next if options[:disabled] + # If the guest port is 0, put it in the random group if options[:guest] == 0 random << options[:host]