fix(container-creation): fix default network on Windows platform (#298)

pull/300/head
Anthony Lapenna 2016-10-29 17:49:21 +13:00 committed by GitHub
parent 0bdbb4a75d
commit 17f35ef705
1 changed files with 3 additions and 0 deletions

View File

@ -78,6 +78,9 @@ function ($scope, $state, $stateParams, Config, Info, Container, Image, Volume,
networks.push({Name: "none"});
}
$scope.availableNetworks = networks;
if (!_.find(networks, {'Name': 'bridge'})) {
$scope.config.HostConfig.NetworkMode = 'nat';
}
}, function (e) {
Messages.error("Failure", e, "Unable to retrieve networks");
});