1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-21 22:39:41 +02:00

fix(container-creation): ensure exposedPorts exists (#3770)

This commit is contained in:
Maxime Bajeux 2020-04-29 04:33:37 +02:00 committed by GitHub
parent 7f0ce61413
commit 7fe7ce1a0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;