diff --git a/app/components/createContainer/createContainerController.js b/app/components/createContainer/createContainerController.js index aaa2f82f8..70ef048aa 100644 --- a/app/components/createContainer/createContainerController.js +++ b/app/components/createContainer/createContainerController.js @@ -17,6 +17,7 @@ function ($scope, $state, Config, Container, Image, Volume, Network, Messages, e $scope.config = { Env: [], + ExposedPorts: {}, HostConfig: { RestartPolicy: { Name: 'no' @@ -150,6 +151,7 @@ function ($scope, $state, Config, Container, Image, Volume, Network, Messages, e if (portBinding.hostPort && portBinding.containerPort) { var key = portBinding.containerPort + "/" + portBinding.protocol; bindings[key] = [{ HostPort: portBinding.hostPort }]; + config.ExposedPorts[key] = {}; } }); config.HostConfig.PortBindings = bindings;