fix(create-container): init ExposedPorts on container creation process (#2933)

pull/2966/head
Michael Oborne 2019-06-21 21:48:52 +08:00 committed by xAt0mZ
parent 96f266adf6
commit fb69ffa764
1 changed files with 3 additions and 0 deletions

View File

@ -139,6 +139,9 @@ function ($q, $scope, $state, $timeout, $transition$, $filter, Container, Contai
function preparePortBindings(config) {
var bindings = {};
if (config.ExposedPorts === undefined) {
config.ExposedPorts = {};
}
config.HostConfig.PortBindings.forEach(function (portBinding) {
if (portBinding.containerPort) {
var key = portBinding.containerPort + '/' + portBinding.protocol;