mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
fix(container-creation): handle extraHosts correctly (#4139)
* fix(container-creation): handle extraHosts correctly * fix(container-creation): refactor for readability
This commit is contained in:
parent
747fdae269
commit
1b88ca2285
1 changed files with 4 additions and 5 deletions
|
@ -280,11 +280,10 @@ angular.module('portainer.docker').controller('CreateContainerController', [
|
||||||
}
|
}
|
||||||
config.HostConfig.Dns = dnsServers;
|
config.HostConfig.Dns = dnsServers;
|
||||||
|
|
||||||
$scope.formValues.ExtraHosts.forEach(function (v) {
|
config.HostConfig.ExtraHosts = _.map(
|
||||||
if (v.value) {
|
_.filter($scope.formValues.ExtraHosts, (v) => v.value),
|
||||||
config.HostConfig.ExtraHosts.push(v.value);
|
'value'
|
||||||
}
|
);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function prepareLabels(config) {
|
function prepareLabels(config) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue