mirror of https://github.com/portainer/portainer
fix(create-container): init ExposedPorts on container creation process (#2933)
parent
96f266adf6
commit
fb69ffa764
|
@ -139,6 +139,9 @@ function ($q, $scope, $state, $timeout, $transition$, $filter, Container, Contai
|
||||||
|
|
||||||
function preparePortBindings(config) {
|
function preparePortBindings(config) {
|
||||||
var bindings = {};
|
var bindings = {};
|
||||||
|
if (config.ExposedPorts === undefined) {
|
||||||
|
config.ExposedPorts = {};
|
||||||
|
}
|
||||||
config.HostConfig.PortBindings.forEach(function (portBinding) {
|
config.HostConfig.PortBindings.forEach(function (portBinding) {
|
||||||
if (portBinding.containerPort) {
|
if (portBinding.containerPort) {
|
||||||
var key = portBinding.containerPort + '/' + portBinding.protocol;
|
var key = portBinding.containerPort + '/' + portBinding.protocol;
|
||||||
|
|
Loading…
Reference in New Issue