mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 14:59:41 +02:00
fix(container-creation): ensure exposedPorts exists (#3770)
This commit is contained in:
parent
7f0ce61413
commit
7fe7ce1a0a
1 changed files with 5 additions and 0 deletions
|
@ -89,6 +89,11 @@ angular.module('portainer.docker').factory('ContainerHelper', [
|
||||||
EndpointsConfig: {},
|
EndpointsConfig: {},
|
||||||
};
|
};
|
||||||
config.NetworkingConfig.EndpointsConfig = container.NetworkSettings.Networks;
|
config.NetworkingConfig.EndpointsConfig = container.NetworkSettings.Networks;
|
||||||
|
|
||||||
|
if (config.ExposedPorts === undefined) {
|
||||||
|
config.ExposedPorts = {};
|
||||||
|
}
|
||||||
|
|
||||||
if (mode.indexOf('container:') !== -1) {
|
if (mode.indexOf('container:') !== -1) {
|
||||||
delete config.Hostname;
|
delete config.Hostname;
|
||||||
delete config.ExposedPorts;
|
delete config.ExposedPorts;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue