mirror of https://github.com/portainer/portainer
fix(container-creation): ensure exposedPorts exists (#3770)
parent
7f0ce61413
commit
7fe7ce1a0a
|
@ -89,6 +89,11 @@ angular.module('portainer.docker').factory('ContainerHelper', [
|
|||
EndpointsConfig: {},
|
||||
};
|
||||
config.NetworkingConfig.EndpointsConfig = container.NetworkSettings.Networks;
|
||||
|
||||
if (config.ExposedPorts === undefined) {
|
||||
config.ExposedPorts = {};
|
||||
}
|
||||
|
||||
if (mode.indexOf('container:') !== -1) {
|
||||
delete config.Hostname;
|
||||
delete config.ExposedPorts;
|
||||
|
|
Loading…
Reference in New Issue