fix(container-creation): always rebuild exposed ports (#4024)

pull/4034/head
itsconquest 2020-07-09 17:08:52 +12:00 committed by GitHub
parent cd475a5338
commit 181a6f4553
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -189,6 +189,7 @@ angular.module('portainer.docker').controller('CreateContainerController', [
function preparePortBindings(config) {
const bindings = ContainerHelper.preparePortBindings(config.HostConfig.PortBindings);
config.ExposedPorts={};
_.forEach(bindings, (_, key) => (config.ExposedPorts[key] = {}));
config.HostConfig.PortBindings = bindings;
}